<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>macports | /var/logs/paulooi.log</title>
	<atom:link href="https://logs.paulooi.com/tag/macports/feed" rel="self" type="application/rss+xml" />
	<link>https://logs.paulooi.com</link>
	<description>Systems Admin, Web Development and etc</description>
	<lastBuildDate>Sat, 23 Jul 2011 02:02:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>OS X Lion Macports</title>
		<link>https://logs.paulooi.com/os-x-lion-macports-1.php</link>
					<comments>https://logs.paulooi.com/os-x-lion-macports-1.php#comments</comments>
		
		<dc:creator><![CDATA[Paul Ooi]]></dc:creator>
		<pubDate>Fri, 22 Jul 2011 06:54:05 +0000</pubDate>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[lion]]></category>
		<category><![CDATA[macports]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[snow leopard]]></category>
		<guid isPermaLink="false">http://systems.takizo.com/?p=1493</guid>

					<description><![CDATA[<p>OS X Lion Macports, Can I upgrade from Snow Leopard? With the new release of Apple Mac OS X Lion, there are a lot of changes on the kernel and backends. Therefore I don&#8217;t think it&#8217;s possible to do port...</p>
The post <a href="https://logs.paulooi.com/os-x-lion-macports-1.php">OS X Lion Macports</a> first appeared on <a href="https://logs.paulooi.com">/var/logs/paulooi.log</a>.]]></description>
										<content:encoded><![CDATA[<h1>OS X Lion Macports, Can I upgrade from Snow Leopard?</h1>
<p>With the new release of Apple Mac OS X  Lion, there are a lot of changes on the kernel and backends. Therefore I don&#8217;t think it&#8217;s possible to do port upgrade on Macports in order to upgrade your existing or installed ports in OS X Snow Leopard. <span id="more-1493"></span></p>
<p><a href="https://logs.paulooi.com/wp-content/uploads/2011/07/os-x-lion-macports.png"><img decoding="async" src="https://logs.paulooi.com/wp-content/uploads/2011/07/os-x-lion-macports.png" alt="OS X Lion Macports" title="OS X Lion Macports" width="183" height="70" class="aligncenter size-full wp-image-1494" /></a></p>
<p>I have tried several times to upgrade ports previously installed in Snow Leopard, unfortunately no luck to getting it works in OS X Lion Macports, some library couldn&#8217;t load and some library cannot be found. Failed miserably with tons of error messages. </p>
<p>I have decided to re-install, or rather clean install Macports on my newly installed Mac OS X Lion. </p>
<h2>OS X Lion Macports with XCode 4.1</h2>
<p>Before installing <strong>OS X Lion Macports</strong>, you need to download and install latest Xcode 4.1 which designs for Mac OS X Lion. Xcode 4.1 can be downloaded at App Store, the file size is around 2.96GB, it might take some time for user who has slow internet access. </p>
<p>The existing Xcode on your Snow Leopard will not support latest version of Macports. </p>
<p><a href="https://logs.paulooi.com/wp-content/uploads/2011/07/os-x-lion-macports-xcode.png"><img fetchpriority="high" decoding="async" src="https://logs.paulooi.com/wp-content/uploads/2011/07/os-x-lion-macports-xcode-300x259.png" alt="OS X Lion Macports" title="OS X Lion Macports" width="300" height="259" class="aligncenter size-medium wp-image-1495" srcset="https://logs.paulooi.com/wp-content/uploads/2011/07/os-x-lion-macports-xcode-300x259.png 300w, https://logs.paulooi.com/wp-content/uploads/2011/07/os-x-lion-macports-xcode.png 620w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<h2>OS X Lion Macports, Before Clean Install</h2>
<p>Before proceed with <em>OS X Lion Macports</em> clean install, I suggest you do a few things as I listed below. </p>
<p>1. Dump current installed packages database. Run &#8220;port installed > installed.ports.log&#8221; to keep a list of packages currently install on your Macports. Which later you will need to re-install all the packages. Below is the sample of my current installed packages. </p>
<pre>
<code>
  apache2 @2.2.19_0+preforkmpm (active)
  apr @1.4.5_1 (active)
  apr-util @1.3.12_0 (active)
  atk @1.32.0_0 (active)
  autoconf @2.68_2 (active)
  autoconf213 @2.13_1 (active)
  automake @1.11.1_0 (active)
  axel @2.4_0 (active)
  bison @2.5_0 (active)
  bzip2 @1.0.6_0 (active)
  c-ares @1.7.4_0 (active)
  cacti @0.8.7g_1 (active)
  cairo @1.10.2_3 (active)
  ctags @5.8_0 (active)
  curl @7.21.7_0+ssl (active)
  curl-ca-bundle @7.21.7_0 (active)
  cyrus-sasl2 @2.1.23_3+kerberos (active)
  db46 @4.6.21_6 (active)
  dbus @1.4.12_0 (active)
  dia @0.97.1_2 (active)
  docbook-xml @5.0_0 (active)
</code>
</pre>
<p>2. Dump or backup your database data such as PostgreSQL and MySQL. </p>
<p>3. Backup your old directory, which is &#8220;/opt/local&#8221;, rename it to &#8220;/opt/local-snowleopard&#8221;, this is to keep all your data in order to migrate over to newly installed Macports later on. </p>
<h2>OS X Lion Macports Clean Install</h2>
<p>Macports team has not release latest Macports package/installer for OS X Lion (as when I written this post). If the official download is not available for OS X Lion, you need to install it from latest subversion built.</p>
<p>Create a new directory to check out latest subversion built for <u><a href="http://guide.macports.org/#installing.macports.subversion" title="OS X Lion Macports">OS X Lion Macports</a></u></p>
<pre>
<code>
# mkdir /opt/lion-macports 
# cd /opt/lion-macports
# svn co http://svn.macports.org/repository/macports/trunk
</code>
</pre>
<p>This will download the latest build of subversion, next we will proceed with OS X Lion Macports installation </p>
<pre>
<code>
# cd /opt/lion-macports/trunk/base
# ./configure --enable-readline
# make
# sudo make install
# make distclean 
</code>
</pre>
<p>After installation, make sure OS X Lion Macports binary is exported into your environment path, existing user should not have this problem, for new user, edit your environment path as show below; Search for export path line</p>
<pre>
<code>
#sudo vi ~/.bash_profile
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
</code>
</pre>
<p>Add /opt/local/bin and /opt/local/sbin into export PATH. </p>
<p>After environment path has been configured, get the latest update port tree and your are done </p>
<pre>
<code>
# sudo port -d selfupdate 
</code>
</pre>
<h2>OS X Lion Macports. Install package</h2>
<p>You are basically you done Macports installation on Mac OS X Lion. Refer to your dump file I mentioned earlier &#8220;installed.ports.log&#8221;, re-install all the packages or the packages you need in newly installed OS X Lion Macports</p>
<p>I know it&#8217;s a little PITA (Pain In the Ass), but so far this is the only solution which can fix my problem by migrating into OS X Lion Macports. </p>
<h3>OS X Lion Macports. Re-install MySQL</h3>
<p>This is an example how I reinstall and load MySQL database which previously installed on Snow Leopard Macports into OS X Lion Macports. </p>
<p>1. Firstly, clean install MySQL5.1 database</p>
<pre>
<code>
# sudo port -v install mysql5-server 
</code>
</pre>
<p>You might see error with plist conflict</p>
<pre>
<code>
</code>
Error: Target org.macports.activate returned: Image error: /Library/LaunchDaemons/org.macports.mysql5.plist already exists and does not belong to a registered port.  Unable to activate port mysql5-server. Use 'port -f activate mysql5-server' to force the activation.
Warning: the following items did not execute (for mysql5-server): org.macports.activate
Log for mysql5-server is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mysql5-server/mysql5-server/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>
</pre>
<p>To fix it, force plist replacement. </p>
<pre>
<code>
# sudo port -f activate mysql5-server
--->  Computing dependencies for mysql5-server
--->  Activating mysql5-server @5.1.57_0
Warning: File /Library/LaunchDaemons/org.macports.mysql5.plist already exists.  Moving to: /Library/LaunchDaemons/org.macports.mysql5.plist.mp_1311315120.
--->  Cleaning mysql5-server
</code>
</pre>
<p>2. Move database into data directory, it required root privileges </p>
<pre>
<code>
# sudo su 
# cp -RPa /opt/local-snowleopard/var/db/mysql5 /opt/local/var/db/
</code>
</pre>
<p>3. Start MySQL Server</p>
<pre>
<code>
# sudo /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper start
</code>
</pre>
<p>Please also share how you migrate existing Macports into OS X Lion Macports. </p>The post <a href="https://logs.paulooi.com/os-x-lion-macports-1.php">OS X Lion Macports</a> first appeared on <a href="https://logs.paulooi.com">/var/logs/paulooi.log</a>.]]></content:encoded>
					
					<wfw:commentRss>https://logs.paulooi.com/os-x-lion-macports-1.php/feed</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
	</channel>
</rss>
