Find the library or program that installs a specific file with apt-file

Sometime you could end up in a situation where you need to know which program or library installs a file. That happened to me while installing redmine. I got an error telling me that it couldn’t find the MagickWand.h file. apt-file tells you the library you need to install to get that file.

$ sudo apt-get install apt-file
$ sudo apt-file update
$ apt-file search MagickWand.h
imagemagick-doc: /usr/share/doc/imagemagick/www/api/MagickWand/struct__MagickWand.html
libmagickwand-dev: /usr/include/ImageMagick/wand/MagickWand.h

Thus I installed libmagickwand-dev and the problem went away:

sudo apt-get install libmagickwand-dev

You might also like

Can’t configure with cmake in Mac OS X 10.8 and Xcode 4.4
I just did a clean install of Mac OS X 10.8 Mountain Lion and Xcode 4.4 so when I was ready to compile...
Apache 2 + MySQL 5 + PHP 5.3 + phpMyAdmin 3.5.4 installation script for Mac OS X using MacPorts
Based on the instructions provided by Gilles Fabio I've created a complete installation script to install...
Avoid Android File Transfer starting automatically in Mac OS X after Android device plugin to USB port
"Android File Transfer" application starts automatically in Mac OS X when you plug your Android device...
Install OpenCV in Ubuntu 10.10
If you want to install OpenCV 2.1 you can just use apt-get to do the work: sudo apt-get install libcv-dev...
Leave a comment ?

0 Comments.

Leave a Comment