Pretending a Package is Installed by Creating an Empty Package with Checkinstall (for Debian-based Distributions)

After installing ffmpeg from svn with checkinstall, I had the problem that the also installed library libavcodec51 is not compatible with the one delivered with Ubuntu. But I could not simply uninstall it so that the manually installed version was used because that caused problems with libxine1-ffmpeg, which stopped kaffeine, amarok and other software from running properly.

Unfortunately, checkinstall's --provides option did not work as expected. So I had to find a way to have them use the manually installed version I compiled from svn and hiding that fact that my package manager. I had to let the package management system know the package was already installed.

So I ended up creating an artificial package that only has the same name and a similar package version, but no actual contents. Create an empty directory, place the following Makefile into it and execute the following checkinstall command. You may need to adjust the parameters for different packages, refer to the output of apt-cache policy somepackage for an appropriate version number)

install -d /usr/local/bin

checkinstall commands:
checkinstall --nodoc --install=no --pkgname=libavcodec51 --pkgversion=3:0.svn$(date +%Y%m%d)-12ubuntu5
checkinstall --nodoc --install=no --pkgname=libavutil49 --pkgversion=3:0.svn$(date +%Y%m%d)-12ubuntu5
checkinstall --install=no --nodoc --pkgname=libavformat52 --pkgversion=3:0.svn$(date +%Y%m%d)-12ubuntu5
sudo dpkg --install ./*.deb
sudo ldconfig

This elegantly fixed the error "ffplay: symbol lookup error: /usr/local/lib/ undefined symbol: av_gcd" and "ffmpeg: error while loading shared libraries: cannot open shared object file: No such file or directory" for me.


  1. Hi! Last time recompiled ffmpeg from svn I had some trouble with this too ( from ) I'll give this a try later thx!

  2. sudo apt-get install equivs-build
    equivs-build libavcodec51

  3. Hi BJ,

    thanks! Good to know.
    you mean: sudo apt-get install equivs ;)

  4. Thank you for posting this. I've been having the same problem for about two weeks after compiling ffmpeg for mediatomb 0.12

    Thought something like this may have fixed the dependancy issue but I didn't know how to construct an empty make file.


  5. I am trying to use the fix, but installation fails:

    How do you think, what am I doing wrong?

    Thank you!

  6. Is it correct that I've maned the project folder libavcodec51? I've places a Makefile inside with those content given:
    install -d /usr/local/bin

    But it throws those error posted before.


  7. did you check with and without space at the beginning and end of the makefile?

    you could try the equivs package, see above in the comments.

  8. Hi,

    how do I "Create an empty directory, place the following Makefile into it and execute the following checkinstall command".

    It's baby steps for me and I'll be so glad for a helping hand.

  9. 1. mkdir empty
    2. cd empty
    nano Makefile (enter text, ctrl-x, Y (for yes).
    3. execute command, replace package name and version with whatever you need.


I appreciate comments. Feel free to write anything you wish. Selected comments and questions will be published.