How To Install On Debian with Several Codecs

How To Install On Debian with Several Codecs

mplayer project home page

These step by step instructions have been tested on June 25, 2005

I have tested this how-to on Etch (Testing).

This howto only includes codecs for win32, Quicktime, RealPlayer, Live.com (streaming for protocols such as reaplayer), and some less common AVI.

Not up for doing all of this? There are unofficial debian packages provided by marillat: read more

Otherwise...

Files to download

Source:

MPlayer v1.0pre7 source - 6.6M M go here to download, or download directly from:mirror2)
(unless you have a src file of your own you wish to use)

Codecs:

win32codecs.tar.bz2 - 6.3 M (mirror1 | mirror2)
divx4linux-20020418.tgz - 288 K (mirror1 | mirror2)
live.2005.06.16.tar.gz - 398 K (mirror2)
qt6dlls.tar.bz2 - 2.5 M (mirror1 | mirror2)
rp8codecs.tar.bz2 - 380 K (mirror1 | mirror2) OR rp9codecs.tar.bz2 - 500 K (mirror1 | mirror2)
(some realplayer stuff wont work with 8, some won't work with 9, you just need to choose which is best for you. I use 8, so in my directions I will be using that, just change the number if you want to use 9)

User Conf:

mplayer-user-conf.tar - 690 k (mirror1 | mirror2)

Since I don't know where you are downloading these to, you will just need to move them to the proper place when I ask you to unpack them.

Uninstalling Old Version

If you have an older version of mplayer on your system remove all traces of it (if you used a deb do dpkg -P mplayer then go through your system and make sure EVERYTHING for mplayer is gone, some things will not be removed with dpkg -P). This step is VERY important.

Things from apt

as root:

apt-get install libogg0 libogg-dev libvorbis0a libvorbis-dev vorbis-tools libpng3 libpng2-dev liblogfile-rotate-perl libconfhelper-perl debhelper fakeroot g++ libgtk1.2 libgtk1.2-dev svgalibg1 svgalibg1-dev aalib1 aalib1-dev libsdl1.2-dev

NOTE: Make sure your gcc and g++ versions match!

Installing the Codecs

as root:

rm -r /usr/lib/win32

(If it exists. These are the w32 codecs, don't worry, we will replace these later, you can pack them up and move them if you are really concerned about losing them)

cd /usr/lib/

mkdir win32

Win32 codecs

cd win32/

tar -jxvvf win32codecs.tar.bz2

Quicktime codecs

tar -jxvvf qt6dlls.tar.bz2

Live.com Codecs (for streaming realplayer)

cd /usr/local/lib/

tar -xvvzf live.2005.06.16.tar.gz

cd live/

./genMakefiles linux

make

divx4linux package, added support for filetypes like AVI (see http://avifile.sourceforge.net/ for more)

cd /usr/src/

mkdir mplayer

cd mplayer/

tar -xvvzf divx4linux-20020418.tgz

cd divx4linux-20020418/

sh install.sh

Realplayer Codecs

cd /usr/src/mplayer/

tar -jxvvf rp8codecs.tar.bz2

Setting up the ~/.mplayer directory

(you can skip this if you have your own configs and settings, and/or don't want to use gmplayer)

become your user

cd

tar -xvvf mplayer-user-conf.tar

this will create the ~/.mplayer directory including a skin (neutron), arial size 18 font, and config file

in line 27 of the ~/.mplayer/gui.conf file, change: font_name = "/home/lyz/.mplayer/font/font.desc" to reflect your username (I havent found a way around this step, ~ doesn't work).

Creating the .deb and installing mplayer

as root:

cd /usr/src/mplayer/

tar -jxvvf MPlayerVersion.tar.bz2 (where 'Version' is your version, ie -1.0pre7)

cd MPlayerVersion

DEB_BUILD_OPTIONS="--disable-runtime-cpudetection --enable-gui --disable-rtc --enable-live --with-livelibdir=/usr/local/lib/live --enable-real --with-reallibdir=/usr/src/mplayer/rp8codecs/" fakeroot debian/rules binary

Make sure there aren't spaces between -- and any-of-the-options

when it's finished compiling, it will create an mplayerVersion.deb file in /usr/src/mplayer

cd /usr/src/mplayer/

dpkg -i mplayerVersion.deb

when it asks about video output choose which is right for you, if unsure just use xv

The End

launch mplayer by typing mplayer moviefile (where moviefile is the name of the file you wish to use to test mplayer)

You're done! Congrats!

Some Notes:

This also includes gmplayer. gmplayer allows you to use "skins" for mplayer, I don't usually use skins because I don't need the gui control, and the skins tend to take away from speed and quailty of movie decoding.

In debian unstable, in September of 2003 the following was noted: "The gtk1.2 and gtk1.2-dev was not found within the sources. This made the building of the deb file abort quickly. A bit of searching the web and guessing made me try install libgtkmm-dev. This did it. The following dpkg -i went fine." (thanks Helge)

It was also noted that in unstable xv might not work properly as a video output, try x11.

Sometimes you will want to watch realplayer files that are .ram; remember that a .ram can be viewed as a simple text file with the stream location of the actual .rm is in that file. mplayer will not play the .ram but it will play the .rm stream. (Apparently there is a patch out so that mplayer will play .ram but I have never used it).

FAQ

There is an mplayer in apt, why would I want to install this one?

If you are at this site, you probably know the answer to this. The one in apt is an older version, and above all, does not support the quicktime codecs.

Something broke, can you help?

I might be able to, as I said, I have tested this, and if something broke it might be a conflict in versions (stable vs testing vs unstable vs mixed system) or a simple user error. It is quite possibly due to not completely uninstalling previous versions of mplayer, this is a very important step! If all else fails, you can always uninstall the deb, and reinstall what you had before.

I'm not on debian but I want to install mplayer, any pointers?

Not really, I could point you to some sites I have found for other distros, but I have never tried them, so I can't guarantee they will work.

Why don't you include more codecs?

Are there many more? I have included the ones I primarily use, so these are the only codecs I have installed and tested.

What about DVD support?

I don't have a DVD-ROM, so I have no way of testing DVD support, sorry.

阅读更多

【转】How to install RabbitMQ with the latest Erlang release on Debian

03-27

RabbitMQ is an Erlang application. The language moves fast and every new release has performance optimizations. This is good until you try to install the RabbitMQ DEB package in your Debian-like server and you see that the package manager installed an old version of Erlang.rnrnFor Debian Squeeze, the package erlang-nox comes with Erlang R14A (released in June's 2010). The backports package comes with Erlang R15B01 (released in April's 2012). For the current Ubuntu LTS (Precise), erlang-nox comes with Erlang R14B04 (released in October's 2011) while the latest Raring package - like Debian Squeeze backports - comes with Erlang R15B01.rnrnThis post shows how to compile the latest Erlang release (R16B) in Debian Squeeze and how to satisfy the erlang-nox dependency of the RabbitMQ DEB package.rnrnCompiling ErlangrnThe compilation process is very straightforward, we'll basically follow the steps available in the official [url=http://www.erlang.org/doc/installation_guide/INSTALL.html]Erlang's documentation[/url]. First, install some of its dependencies:rnrn[b]$ sudo aptitude install -y build-essential libssl-dev ncurses-dev m4[/b]rnExplaining the dependencies:rnrn[url=http://packages.debian.org/squeeze/build-essential]build-essential[/url]: list of packages considered essential to build Debian packages. Some of these packages are needed to compile Erlang like gcc and make rn[url=http://packages.debian.org/squeeze/libssl-dev]libssl-dev[/url]: needed for SSL support rn[url=http://packages.debian.org/squeeze/ncurses-dev]ncurses-dev[/url]: for improved terminal support rn[url=http://packages.debian.org/squeeze/m4]m4[/url]: needed to compile with HiPE support (High Performance Erlang) rnThen download and compile Erlang:rnrn[b]$ sudo mkdir -p /opt/src/erlang /opt/erlangrn$ cd /opt/src/erlangrn$ sudo curl -O http://www.erlang.org/download/otp_src_R16B.tar.gzrn$ sudo tar xzvf otp_src_R16B.tar.gzrn$ sudo mv otp_src_R16B r16brn$ cd r16brn$ sudo ./configure --prefix=/opt/erlang/r16b --enable-hipe --with-sslrn$ sudo makern$ sudo make install[/b]rnFinally, symlink the Erlang binaries (if you don't want to use symbolic links, you can run configure with the [b]--bindir=/usr/bin[/b] option):rnrn[b]$ sudo ln -s /opt/erlang/r16b/bin/dialyzer /usr/binrn$ sudo ln -s /opt/erlang/r16b/bin/epmd /usr/binrn$ sudo ln -s /opt/erlang/r16b/bin/erl /usr/binrn$ sudo ln -s /opt/erlang/r16b/bin/erlc /usr/binrn$ sudo ln -s /opt/erlang/r16b/bin/run_erl /usr/binrn$ sudo ln -s /opt/erlang/r16b/bin/run_test /usr/binrn$ sudo ln -s /opt/erlang/r16b/bin/typer /usr/bin[/b]rnInstalling RabbitMQrnDownload the RabbitMQ DEB package available on the project's website:rnrn[b]$ cd /tmp && curl -O http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.0/rabbitmq-server_3.1.0-1_all.deb[/b]rnAs we already discussed, this package depends on the erlang-nox package:rnrn[b]$ dpkg -I rabbitmq-server_3.1.0-1_all.debrn Package: rabbitmq-serverrn Version: 3.1.0-1rn Architecture: allrn Maintainer: RabbitMQ Team rn Installed-Size: 4460rn Depends: erlang-nox (>= 1:12.b.3) | esl-erlang, adduser, logrotatern Section: netrn Priority: extrarn Homepage: http://www.rabbitmq.com/rn Description: AMQP server written in Erlangrn RabbitMQ is an implementation of AMQP, the emerging standard for highrn performance enterprise messaging. The RabbitMQ server is a robust andrn scalable implementation of an AMQP broker.[/b]rnIf you try to install the package using aptitude, the package manager will install an old version of Erlang. The easiest way to prevent this is to use dpkg with the --ignore-depends option:rnrn[b]$ sudo dpkg -i --ignore-depends=erlang-noxrn(Reading database ... 42128 files and directories currently installed.)rnPreparing to replace rabbitmq-server 3.1.0-1 (using rabbitmq-server_3.1.0-1_all.deb) ...rnUnpacking replacement rabbitmq-server ...rnSetting up rabbitmq-server (3.1.0-1) ...rnAdding group `rabbitmq' (GID 107) ...rnDone.rnAdding system user `rabbitmq' (UID 105) ...rnAdding new user `rabbitmq' (UID 105) with group `rabbitmq' ...rnNot creating home directory `/var/lib/rabbitmq'.rnStarting message broker: rabbitmq-server.rnProcessing triggers for man-db ...[/b]rnYou can check that RabbitMQ is running using the rabbitmqctl command:rnrn[b]$ sudo rabbitmqctl statusrnStatus of node rabbit@squeeze64 ...rn[pid,1776,rn running_applications,[rabbit,"RabbitMQ","3.1.0",rn mnesia,"MNESIA CXC 138 12","4.8",rn os_mon,"CPO CXC 138 46","2.2.11",rn xmerl,"XML parser","1.3.3",rn sasl,"SASL CXC 138 11","2.3.1",rn stdlib,"ERTS CXC 138 10","1.19.1",rn kernel,"ERTS CXC 138 10","2.16.1"],rn...[/b]rnResolving the dependencyrnWhat we did when installing RabbitMQ was to simply ask dpkg to ignore the dependency during the installation transaction. The problem is that for the package manager, the dependency is still unfulfilled. If you try to install or upgrade a package, the package manager will suggest to remove the rabbitmq-server package because of its unmet dependency:rnrn[b]$ sudo aptitude install treernThe following NEW packages will be installed:rn treern0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.rnNeed to get 32.4 kB of archives. After unpacking 98.3 kB will be used.rnThe following packages have unmet dependencies:rn rabbitmq-server: Depends: erlang-nox (>= 1:12.b.3) but it is not going to be installed. orrn esl-erlang which is a virtual package.rnThe following actions will resolve these dependencies:rnrn Remove the following packages:rn1) rabbitmq-serverrnrnAccept this solution? [Y/n/q/?][/b]rnIf you don't accept the solution, aptitude will suggest the installation of a lot of Erlang-related packages. This is not what we want, we want to have RabbitMQ installed with the Erlang version that we've compiled. To resolve this dependency, we'll create a dummy package using equivs. From the equivs-build documentantion: "equivs-build is a program that creates Debian packages which can be used to inform dpkg about locally installed packages and their dependencies. Also empty packages that just require other packages can be created with equivs. These can be used as "profile" packages which just mark other ones for installation."rnrnBefore installing equivs, uninstall RabbitMQ:rnrn[b]$ sudo aptitude purge -y rabbitmq-server[/b]rnThen install equivs:rnrn[b]$ sudo aptitude install -y equivs[/b]rnCreate a file with the following contents:rnrn[b]Section: interpretersrnPriority: optionalrnStandards-Version: 3.6.2rnrnPackage: erlang-noxrnVersion: 1:12.b.3rnMaintainer: The Maintainer rnDescription: Dummy Erlang package.rn This package provides a dummy package for erlang-nox, a dependency of the rabbitmq-server package.[/b]rnOr just copy and paste the following commands:rnrn[b]$ erlang_nox="Section: interpretersrnPriority: optionalrnStandards-Version: 3.6.2rnrnPackage: erlang-noxrnVersion: 1:12.b.3rnMaintainer: The Maintainer rnDescription: Dummy Erlang package.rn This package provides a dummy package for erlang-nox, a dependency of rabbitmq-server package from RabbitMQ."rn$ IFS='%'; echo $erlang_nox > erlang-nox; unset IFS[/b]rnThen run the equivs-build command to create the DEB package:rnrn[b]$ equivs-build erlang-noxrn...rndpkg-deb: building package `erlang-nox' in `../erlang-nox_12.b.3_all.deb'.rnrnThe package has been created.rnAttention, the package has been created in the current directory,rnnot in ".." as indicated by the message above![/b]rnNow, install the created DEB package and the RabbitMQ DEB package:rnrn[b]$ sudo dpkg -i erlang-nox_12.b.3_all.deb rabbitmq-server_3.1.0-1_all.deb[/b]rnYou can check that the dummy package was installed:rnrn[b]$ aptitude show erlang-noxrnPackage: erlang-noxrnState: installedrnAutomatically installed: nornVersion: 1:12.b.3rnPriority: optionalrnSection: interpretersrnMaintainer: The Maintainer rnUncompressed Size: 36.9 krnDescription: Dummy Erlang package.rn This package provides a dummy package for erlang-nox, a dependency of rabbitmq-server package from RabbitMQ.[/b]rnNow you don't need to worry about aptitude complaining about the unmet dependency of the rabbitmq-server package. At least not while trying to install new packages. Hold on...rnrnMarking the package as heldrnEverything is fine until you try to upgrade the packages from your system and you see something like this:rnrn[b]$ sudo aptitude safe-upgradernResolving dependencies...rnThe following NEW packages will be installed:rn erlang-asn1a erlang-basea erlang-corbaa erlang-cryptoa erlang-docbuildera erlang-edoca erlang-erl-docgena erlang-eunitarn erlang-ica erlang-inetsa erlang-invisoa erlang-mnesiaa erlang-odbca erlang-os-mona erlang-parsetoolsa erlang-perceptarn erlang-public-keya erlang-runtime-toolsa erlang-snmpa erlang-ssha erlang-ssla erlang-syntax-toolsa erlang-toolsa erlang-webtoolarn erlang-xmerla libltdl7a libsctp1a lksctp-toolsa odbcinsta odbcinst1debian2a unixodbcarnThe following packages will be upgraded:rn erlang-noxrn1 packages upgraded, 31 newly installed, 0 to remove and 0 not upgraded.rnNeed to get 20.8 MB of archives. After unpacking 36.5 MB will be used.rnDo you want to continue? [Y/n/?][/b]rnLook at the erlang-nox file we created before. It declares it version as 1:12.b.3 while the Debian Squeeze erlang-nox package version is 1:14.a-dfsg-3squeeze1. If we created the dummy package declaring a most recent version, we'd have the same problem if a new version was released.rnrnTo resolve this, just mark the package as held with aptitude:rnrn[b]$ sudo aptitude hold erlang-nox[/b]rnaptitude show will show the package as installed and held:rnrn[b]$ aptitude show erlang-noxrnPackage: erlang-noxrnState: installed [held]rn...[/b]rnNow you are free from the package constraints and use the desired Erlang version for running not just RabbitMQ but any Erlang application!rn

没有更多推荐了,返回首页