Prompt what package to install when it is missing
phillip.koebbe at gmail.com
Fri Nov 11 12:06:48 PST 2011
On Nov 11, 2011, at 1:56 PM, Peng Yu wrote:
> On Fri, Nov 11, 2011 at 1:53 PM, Phillip Koebbe
> <phillip.koebbe at gmail.com> wrote:
>> On Nov 11, 2011, at 1:02 PM, 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
>> Since Ubuntu is based on Debian, it's built around APT and knows what's installed. I know of nothing built-in, either in the Mac OS or in MacPorts, that could do the same thing. Since there are various ways of installing software on a Mac (download a dmg/pkg, Mac App Store, MacPorts, Homebrew, self-compile, etc), and you can have software installed in various places (/opt, /sw, /usr/local, /Applications, ~/Applications, etc), I'm inclined to think it would be quite difficult to pull off for a third party application.
> I was not taking about the general question as you mentioned. A
> smaller step is to just prompt macport packages.
I understand, Peng. I didn't make my point very well. If there are so many ways to install something on a Mac, and MacPorts can only know about what it is responsible for, and you access that through the port command, it doesn't seem reasonable that by trying to execute some random command that MacPorts would understand what it is you are trying to do and what you should to rectify the situation. Debian Linux is built on top of APT and is designed to do what you are asking about. It's a very integral part of the system. MacPorts, while a wonderful add-on to Mac OS, isn't in the underpinnings of the operating system and can't know what you have on your system.
More information about the macports-users