sudo port install apache2
Ryan Schmidt
ryandesign at macports.org
Mon Dec 17 02:15:02 PST 2007
On Dec 16, 2007, at 18:03, Charlse Darwin wrote:
> "The MacPorts binary installer places a .profile file in your home
> directory (view files preceded by a dot with 'ls -a'). The contents
> of this ~/.profile file adds the MacPorts paths in front of the
> standard Unix paths for the default BASH shell. This is done so
> that if you have utilities or libraries from both MacPorts and OS
> X's standard install, the MacPorts libraries will be run instead of
> the ones provided by Apple.
>
> export PATH=/opt/local/bin:/opt/local/sbin:$PATH
> in my system I have
[snip]
> export PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/usr/sbin:/bin:/
> sbin:$PATH
[snip]
> $ env
> #…
> PATH=/Users/pm/Documents/scripts/:/opt/local/bin:/opt/local/sbin:/
> usr/bin:/usr/sbin:/bin:/sbin:/opt/local/bin:/opt/local/sbin:/usr/
> bin:/usr/sbin/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/
> local/teTeX/bin/powerpc-apple-darwin-current
> #…
> $
>
> # env returns more than what I have in ~/.profile?!!
Do you maybe have a ~/.bash_profile which would be used in preference
to any ~/.profile?
> # About directory "/Library/Frameworks/Python.framework/Versions/
> Current/bin/bin" ?!! Whatever feeds those extra paths to env is
> where this weird directory and extra /bin and /sbin stem from.
> $ ls Library/Frameworks/Python.framework/Versions/Current/bin/bin
> ls: Library/Frameworks/Python.framework/Versions/Current/bin/bin:
> No such file or directory
> $ ls Library/Frameworks/Python.framework/Versions/Current/bin/
> ls: Library/Frameworks/Python.framework/Versions/Current/bin/: No
> such file or directory
> $ ls Library/Frameworks/Python.framework/Versions/Current/
> ls: Library/Frameworks/Python.framework/Versions/Current/: No such
> file or directory
> $ ls Library/Frameworks/Python.framework/Versions/
> ls: Library/Frameworks/Python.framework/Versions/: No such file or
> directory
> $ ls Library/Frameworks/Python.framework/
> ls: Library/Frameworks/Python.framework/: No such file or directory
> $ ls Library/Frameworks/
> EWSMac.framework GoogleMapsShared.framework
> Skype.framework
> $
>
> Your point about about direct use of apachectl is well taken but
> what I was trying to say was that since bash calls the bash
> installed by Macport I thought, by the same line of reasoning,
> apachectl should call apachectl installed by Macport. After all
> this is why we set the PATH that way; "if you have utilities or
> libraries from both MacPorts and OS X's standard install, the
> MacPorts libraries will be run instead of the ones provided by Apple."
>
> What am I missing?
The apachectl installed by the apache2 port is not in any of the
paths in your PATH. It is in /opt/local/apache2/bin. If you want
"apachectl" to refer to the MacPorts apache2 apachectl, add /opt/
local/apache2/bin to your PATH. Or add "alias apachectl=/opt/local/
apache2/bin/apachectl" to your ~/.profile (or ~/.bash_profile).
More information about the macports-users
mailing list