Monday, December 31, 2007

Sansa e270 + Ubuntu Gutsy + libmtp 0.2.4

If you install libmtp on Ubuntu 7.10 you get libmtp6-0.2.1 which is sorely out of date and does not play well with my Sansa player. Strangely, MTP in Amarok worked fine in 7.04 but Ubuntu identified it as a digital camera. Since it worked I didn’t complain. No such luck on 7.10. I installed libmtp6-0.2.1 and mtp-detect would segfault about 50% of the time.

The instructions I provide worked well for me but they may destroy your system, make you sterile, catch your house on fire, or worse: accidently install a licensed copy of Windows Vista Home Basic Neutered Edition.

Shut down Amarok and any multimedia software you might be running. In your favorite terminal:

sudo apt-get install build-essential checkinstall
sudo apt-get build-dep libmtp

build-essential pulls in the tools you’ll need for compiling while checkinstall is a nifty tool to build a quasi-sane package for your system. The build-dep command fetches the dependencies required to build the currently available version of libmtp (0.2.1) which for our purposes is good enough. Grab the latest libmtp source from and save it to /tmp. Go into /tmp and do:

tar -xvzf libmtp-0.2.4.tar.gz
cd libmtp-0.2.4

This should hopefully produce the binaries you need. To make a package:

sudo checkinstall

You must answer questions. I elected yes until I got to editing specific fields. I changed summary and name to libmtp6. This is not technically correct as the proper version is libmtp7 but this makes it install as an upgrade rather than a separate package. I With those changes I hit ENTER to continue. The final step to make Amarok happy was to ln the library it was expecting to libmtp7:

sudo ln -s /usr/local/lib/ /usr/lib/

It should be noted that this is The Wrong Way and it will likely rupture the space-time continuum. That being said, Amarok doesn’t seem to need a stable space-time continuum and functions happily for me with this setup.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.