Cleaning Ports and Apache 2.2.8 installation
Ryan Schmidt
ryandesign at macports.org
Fri May 30 20:57:33 PDT 2008
On May 30, 2008, at 21:53, Thomas Hagedorn wrote:
>
> I'm on a MacBookPro, Intel 64-bit, with OS 10.5.2. I had MacPorts
> installed but then I wanted to test a script to do an automatic
> installation. To do that, I ran
>
> sudo rm -r /opt/local
>
> and then ran the script to install MacPorts (via binary package) and
> then other ports.
Note that MacPorts is not necessarily confined to /opt/local. See the
uninstall instructions for the list of all paths you might want to
remove:
http://trac.macports.org/wiki/FAQ#HowdoIremoveoruninstallMacPorts
> I ran into an error with the command
>
> sudo port install apache2 +preforkmpm
>
> as when MacPorts tried to install the dependency sqlite3 it
> produced a
> fatal error about a file not being accessible.
>
> Running the command
>
> sudo port clean sqlite3
>
> helped, as well as breaking up the script into the parts
>
> sudo port install apr
> sudo port install db44
> sudo port install gmake
> sudo port install readline
> sudo port clean sqlite3
> sudo port install sqlite3
> sudo port install apr-util
> sudo port install openssl
> sudo port install apache2 +preforkmpm
>
> to separately install the dependencies (these were the ones that were
> coming up automatically when MacPorts tried to install apache2).
> And my
> script now works without problems. But my question is why?
>
> 1. Why does one need the "sudo port clean sqlite3" command? After
> removing the /opt/local directory, why should any cleaning be needed?
It isn't.
> 2. Why would breaking the script up into the separate commands above
> make a difference?
If you're running MacPorts 1.6.0 (as opposed to trunk) you may have
encountered this:
http://trac.macports.org/wiki/
LeopardProblems#environmentvariablesbecomeblankbetweenconfigureandbuildp
hases
If so, simply running the failing command a second time fixes it,
which is why it seems that doing "whatever" (in this case cleaning
the port) fixes it.
Also, installing each port separately works around it, because the
problem only manifests itself when more than one port is installed in
a single invocation of the port command.
Also, you could install MacPorts trunk (instead of 1.6.0) which
includes a fix.
More information about the macports-users
mailing list