Prompt what package to install when it is missing
ryandesign at macports.org
Fri Nov 11 11:26:11 PST 2011
On Nov 11, 2011, at 13:02, Peng Yu wrote:
> On ubuntu, it can prompt me what to do if a package is missing. I'm
> wondering if there is anything similar on mac.
> ~$ hg
> The program 'hg' is currently not installed. You can install it by typing:
> sudo apt-get install mercurial
Phil, I think you missed the point of the question. The question is, if a user knows they need a program called "hg" but they don't have it installed, what can they do to find out what port, if any, would install it? I happen to know that "hg" is provided by the port "mercurial", but someone not familiar with the software might not know that. The answer is that there is no feature in MacPorts to help you with that. "port provides" only works if you know exactly where the file is on disk, and if you already have the port installed. "port search" only works if the maintainer put the name of the program into the port's description. So, to find out what software package provides a given program, your best bet is to use an Internet search engine, e.g. Google. Then use "port search" to find out if MacPorts has a port for that software package.
More information about the macports-users