MAMP installation fails over libxml on MacBook
Six months ago I did a darwinports installation of PHP5 +MySQL5 +Apache2 on my iBook, which, after some troubles, worked well. Now I'm trying to do the same on a MacBook with Intel Core 2 Duo running under MacOS 10.4.8 and I'm getting nowhere. I've followed the InstallingMacPorts wiki. I've copied and executed all the Terminal commands in the Quickstart. The environment variables appear to be correct, apart from maybe the PATH variable, which does not start with MacPorts path but looks like this: 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 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. 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. 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. Elise van Looij
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).
Op 12-mrt-2007, om 21:52 heeft Ryan Schmidt het volgende geschreven:
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.
Perhaps, but on a new MacBook, fresh out of the factory?
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).
Port installed! I'd forgotten all about that, but the results were a bit strange: apache2 @2.2.2_1 apache2 @2.2.3_0 (active) apr @1.2.7_0 (active) apr-util @1.2.7_0 apr-util @1.2.7_1 (active) cclient @2004g_0 (active) curl @7.15.5_0+darwin_8 (active) DarwinPortsStartup @1.1_0 (active) db4 @4.3.29_0+darwin_8 (active) db44 @4.4.20_0+darwin_8 (active) expat @2.0.0_1 (active) freetype @2.1.10_1 (active) gettext @0.14.6_0 gettext @0.15_0 (active) jpeg @6b_1 (active) libiconv @1.10_1+darwin_8 libiconv @1.11_0+darwin_8 (active) libmcrypt @2.5.7_2+darwin_8 (active) libpng @1.2.10_2+darwin_8 (active) libtool @1.5.22_0 (active) libxml2 @2.6.23_0 (active) libxml2 @2.6.27_0 libxslt @1.1.15_0 (active) mhash @0.9.2_0+darwin_8 (active) mysql5 @5.0.24_0+darwin_8+server mysql5 @5.0.27_0+darwin_8+server (active) neon @0.25.5_0 neon @0.26.2_0 (active) openssl @0.9.8b_0+darwin_8 openssl @0.9.8d_0+darwin_8 (active) pcre @6.6_0 pcre @6.7_0 (active) php4 @4.4.4_2+apache2+darwin_8+macosx+mysql5 php5 @5.1.5_1+apache2+darwin_8+macosx+mysql5 php5 @5.2.0_0+apache2+darwin_8+macosx+mysql5 (active) popt @1.10.4_1 popt @1.10.4_2 (active) rsync @2.6.8_0+darwin_8 (active) subversion @1.3.2_0 subversion @1.4.0_0+mod_dav_svn subversion @1.4.2_0+mod_dav_svn (active) tidy @20051025_0+darwin_8 (active) tiff @3.8.2_0+darwin_8 (active) wget @1.10.2_0+darwin_8 (active) zlib @1.2.3_0 (active) In short, I seem to have duplicates of almost everything. I have now have two httpd.conf, one at /opt/local/apache2/conf, which has all the right lines for php5 and subversion, and one at /opt/local/var/db/ dbports/software/apache2/2.2.2_1/opt/local/apache2/conf/orginal (sic!), which does not have the right lines. And sure enough, when I try to test my php, it does not compile but simply shows the source code. Should I uninstall the old versions? Elise van Looij
After struggling for a few days and getting nowhere, I decided to make a fresh start. When I got my MacBook I took advantage of a very handy OSX feature, namely the offer to hook it up via firewire to my old iBook and have everything automatically copied. This worked great, within three hours all my user info, documents, programs, bookmarks etc. had been transferred to the new laptop and I could practically continue where I left off, except for my MAMP installation. I don't know whether it was the copying process itself or my decision to install MacPorts all over again, but anyway everything I did seemed to result in error messages noone else was getting. Fed up with everything I located the /opt folder (it was not visible in te Finder until I used Spotlight to find it) and threw the whole shebang in the wastebasked, restarted the machine, made sure personal webserver was shut down in System Preference, and reinstalled MacPorts, Apache, MySQL, Subversion and PHP. This time everything went off without a single error message. I'm not up and running yet (for some reason the httpd.conf is not yet configured right), but at least this whole libxml2 nonsense is over. Elise van Looij
Your /opt folder probably got copied and then something died because your processor architecture had changed. On 17 Mar 2007, at 09:22, Elise van Looij wrote:
After struggling for a few days and getting nowhere, I decided to make a fresh start. When I got my MacBook I took advantage of a very handy OSX feature, namely the offer to hook it up via firewire to my old iBook and have everything automatically copied. This worked great, within three hours all my user info, documents, programs, bookmarks etc. had been transferred to the new laptop and I could practically continue where I left off, except for my MAMP installation. I don't know whether it was the copying process itself or my decision to install MacPorts all over again, but anyway everything I did seemed to result in error messages noone else was getting. Fed up with everything I located the /opt folder (it was not visible in te Finder until I used Spotlight to find it) and threw the whole shebang in the wastebasked, restarted the machine, made sure personal webserver was shut down in System Preference, and reinstalled MacPorts, Apache, MySQL, Subversion and PHP. This time everything went off without a single error message. I'm not up and running yet (for some reason the httpd.conf is not yet configured right), but at least this whole libxml2 nonsense is over.
Elise van Looij
_______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Randall Wood rhwood@mac.com "The rules are simple: The ball is round. The game lasts 90 minutes. All the rest is just philosophy."
On Mar 17, 2007, at 13:33, Randall Wood wrote:
On 17 Mar 2007, at 09:22, Elise van Looij wrote:
After struggling for a few days and getting nowhere, I decided to make a fresh start. When I got my MacBook I took advantage of a very handy OSX feature, namely the offer to hook it up via firewire to my old iBook and have everything automatically copied. This worked great, within three hours all my user info, documents, programs, bookmarks etc. had been transferred to the new laptop and I could practically continue where I left off, except for my MAMP installation. I don't know whether it was the copying process itself or my decision to install MacPorts all over again, but anyway everything I did seemed to result in error messages noone else was getting. Fed up with everything I located the /opt folder (it was not visible in te Finder until I used Spotlight to find it) and threw the whole shebang in the wastebasked, restarted the machine, made sure personal webserver was shut down in System Preference, and reinstalled MacPorts, Apache, MySQL, Subversion and PHP. This time everything went off without a single error message. I'm not up and running yet (for some reason the httpd.conf is not yet configured right), but at least this whole libxml2 nonsense is over.
Your /opt folder probably got copied and then something died because your processor architecture had changed.
I just migrated from PPC to i386 yesterday. The port command wouldn't even run for me; complained about architecture mismatches in the pextlib, I believe. Certainly, everything installed with port was compiled for PPC, thus would run slowly on Intel, so it would be beneficial to recompile everything anyway. Was just surprised that port would not run through Rosetta. (Other installed ports, like svn, worked fine through Rosetta.) Currently reinstalling everything for Intel! Uninstall instructions for MacPorts, FYI, are in the FAQ: http://trac.macosforge.org/projects/macports/wiki/ FAQ#HowdoIremoveoruninstallMacPorts
Op 12-mrt-2007, om 21:52 heeft Ryan Schmidt het volgende geschreven:
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".
I hope you'll permit another stupid question. I can only find instructions on how to add to my existing path, but not how to replace it (my 3rd edition of Unix for Dummies, though usually excellent at this kind of thing, falls short here). Should I type into my Terminal: sudo pico ~/.profile and then PATH=/Users/elisevanlooij/bin:/opt/local/bin:/opt/local/sbin:/opt/ local/lib/mysql5/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/ bin:/usr/sbin ? Elise van Looij
On Mar 22, 2007, at 5:30 PM, Elise van Looij wrote:
Should I type into my Terminal:
sudo pico ~/.profile
and then
PATH=/Users/elisevanlooij/bin:/opt/local/bin:/opt/local/sbin:/opt/ local/lib/mysql5/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/ bin:/usr/sbin ?
Yes, that will work (if you really want that) Regards, Elias Pipping
participants (4)
-
Elias Pipping
-
Elise van Looij
-
Randall Wood
-
Ryan Schmidt