MAMP installation fails over libxml on MacBook

Ryan Schmidt ryandesign at macports.org
Mon Mar 12 13:52:54 PDT 2007


On Mar 10, 2007, at 06:26, Elise van Looij wrote:

> PATH=/opt/local/lib/mysql5/bin/mysql:/opt/local/bin/mysql5:/usr/ 
> local/mysql/bin:/bin:/sbin:/usr/bin:/usr/sbin:/opt/local/bin:/opt/ 
> local/lib/mysql5/bin/mysqladmin:/opt/local/lib/mysql5/bin/mysql

My understanding of PATH is that it defines directories in which  
binaries are looked for. Therefore "/opt/local/lib/mysql5/bin/mysql"  
is useless since that is a file, not a directory. Same goes for "/opt/ 
local/lib/mysql5/bin/mysqladmin" and the second "/opt/local/lib/ 
mysql5/bin/mysql".

I personally prefer to place the /opt directories before the  
system's /usr and /bin directories in the path, so that if I install  
newer versions of something using MacPorts which the OS already  
provided older versions of, the new versions get used when I ask for  
them, not the old ones.

My path, for your info and for comparison, is "/Users/rschmidt/bin:/ 
opt/local/bin:/opt/local/sbin:/opt/local/lib/mysql5/bin:/usr/local/ 
bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin".

> Then I downloaded the DarwinPorts1.3.1-10.4.dmg and used it to do  
> the ports installation. This went well and when I executed a 'sudo  
> ports selfupdate', I was told that MacPorts was completely up-to-date.

Well, it told you the MacPorts base software was up-to-date. But  
apparently you had some installed ports, including libxml2, which  
were not up-to-date. "port outdated" will tell you which installed  
ports have newer versions available, and you can then upgrade them.

> Then I tried following the UsingMacPortsQuickStart, but when I  
> issued the command 'sudo port -v install php5 +apache2 +mysql5' I  
> soon ran into problems:
>
> Configuring extensions
> checking whether to enable LIBXML support... yes
> checking libxml2 install dir... /opt/local
> checking for xml2-config path... /opt/local/bin/xml2-config
> checking whether libxml build works... no
> configure: error: build test failed.  Please check the config.log  
> for details.
>
> Warning: the following items did not execute (for php5):  
> com.apple.activate com.apple.configure com.apple.build  
> com.apple.destroot com.apple.install
> Error: Status 1 encountered during processing.

Not sure why it did that, but your instinct was a good one: perhaps  
this was because your libxml2 was old and buggy and a new version  
would fix it.

> I googled on problems with libxml, but I seem to be the only one  
> who installation fails on this. Perhaps foolishly, I tried to  
> correct the problem by installing libxml, but to no avail:
>
> sudo port install libxml2
> Password:
> --->  Fetching libxml2
> --->  Attempting to fetch libxml2-2.6.27.tar.gz from http:// 
> ftp.gnome.org/pub/gnome/sources/libxml2/2.6/
> --->  Verifying checksum(s) for libxml2
> --->  Extracting libxml2
> --->  Configuring libxml2
> --->  Building libxml2 with target all
> --->  Staging libxml2 into destroot
> --->  Installing libxml2 2.6.27_0
> --->  Activating libxml2 2.6.27_0
> Error: Target com.apple.activate returned: Image error: Another  
> version of libxml2 (2.6.23_0) is already active.
>
>
> I have no idea what to do next, any help would be greatly appreciated.

As "port installed" will show, libxml2 is already installed,  
therefore you get an error when you try to install it again. You  
needed to have either uninstalled (or at least deactivated) libxml2  
first ("port uninstall libxml2", or "port deactivate libxml2"), or  
what you probably meant to do is just upgrade libxml2 ("port -u  
upgrade libxml2" -- the -u flag tells port to uninstall the old  
version of the port right before it installs the new version; if you  
don't use -u, it will just deactivate the old version but keep it  
installed so you can activate it again later if you want).





More information about the macports-users mailing list