Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find a macports package given a file name

Tags:

macports

How can one find out the name of the port given a file name, more concretely an executable?

Macport website does not seem to help as you can only search by title and little more.

Thanks!

like image 296
Valentin Ruano Avatar asked Aug 22 '14 23:08

Valentin Ruano


1 Answers

Unfortunately MacPorts currently (2.3.1) only supports that if you have the port installed, i.e. if you want to find out which port installed a file on your system. In this case, you can use port provides </full/path/to/filename>.

If you are looking for a port to install using an executable name, you're out of luck – MacPorts doesn't have the required databases to do that.

What I usually do instead is search for the file in a Linux distribution, e.g. using apt-file search <filename> on Debian. Given the Debian package name, I search for a similar MacPorts port.

like image 160
neverpanic Avatar answered Sep 30 '22 19:09

neverpanic