Recompile SoX on Debian

know this thread is ancient, but it’s the one I came across when googling for an answer, so I thought I’d post my solution here.

You can recompile sox with mp3 encoding support. First, ensure that multiverse, universe and restricted are in your /etc/apt/sources.list. Then install the necessary software and libraries:

Code:
sudo aptitude install sox build-essentials liblame liblame-dev

You need to install liblame and liblame-dev as they are not dependencies of sox and so won’t get installed automatically at the build-dep stage. I put sox in there so as to ensure that all the other non-lame run-time library dependencies for sox get installed before we build and install our new version.

Change directory to a nice place (I like /usr/src), then get the source for sox and the libraries on which it depends:

Code:
sudo apt-get build-dep sox
Code:
sudo apt-get source sox

Unpack the source:

Code:
sudo dpkg-source -x sox_12.18.2-1.dsc

Edit the debian/rules file with your favourite editor:

Code:
sudo vim sox-12.18.2/debian/rules

and comment out, by putting an ‘#’ at the beginning of the line, the two lines that read:

Quote:
DEB_CONFIGURE_EXTRA_FLAGS := —disable-lame

Change directory into the sox source directory

Code:
cd sox-12.18.2

and build the binary deb:

Code:
sudo dpkg-buildpackage -b

Change directory up one level and install the newly built mp3 encoding sox .deb:

Code:
sudo dpkg -i sox_12.18.2-1_i386.deb

And you are done…

 

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *