<?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>A Million Monkeys &#187; aptitude</title>
	<atom:link href="http://www.monkeedev.co.uk/blog/tag/aptitude/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.monkeedev.co.uk/blog</link>
	<description>Surviving life as a sysadmin.</description>
	<lastBuildDate>Mon, 16 May 2011 09:49:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Downgrade PHP to 5.2 in Ubuntu 10.04</title>
		<link>http://www.monkeedev.co.uk/blog/2010/09/14/downgrade-php-to-5-2-in-ubuntu-10-04/</link>
		<comments>http://www.monkeedev.co.uk/blog/2010/09/14/downgrade-php-to-5-2-in-ubuntu-10-04/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 19:35:10 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[5.2]]></category>
		<category><![CDATA[5.3]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[aptitude]]></category>
		<category><![CDATA[downgrade]]></category>
		<category><![CDATA[karmic koala]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lucid lynx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.monkeedev.co.uk/blog/?p=203</guid>
		<description><![CDATA[I installed Ubuntu 10.04 on a few servers a while back, and instantly noticed a lot of problems with a few of our sites (that&#8217;s usually what happens when you do a major upgrade without reading any release notes!). I fairly quickly found out that the cause was that in Ubuntu 10.04, PHP is now [...]]]></description>
			<content:encoded><![CDATA[<p>I installed Ubuntu 10.04 on a few servers a while back, and instantly noticed a lot of problems with a few of our sites (that&#8217;s usually what happens when you do a major upgrade without reading any release notes!). I fairly quickly found out that the cause was that in Ubuntu 10.04, PHP is now running version 5.3 (it was 5.2 in previous releases).</p>
<p>Unfortunately, PHP 5.3 deprecates a few common features (see <a title="php.net changelog for 5.3" href="http://php.net/ChangeLog-5.php" target="_blank">here</a> for more info) which causes a lot of sites to just stop working, or act strangely.</p>
<p>I found that the best way to move forward was to downgrade PHP back to 5.2 while we could work out what the problem was with our sites (as is always the case in a fast moving development cycle, this was months ago and we haven&#8217;t got around to it yet). I found a really useful step by step guide to do this, and within 10 minutes the server was running 5.2 using the Ubuntu Karmic sources.</p>
<p>The guide can be found at <a href="http://mrkandy.wordpress.com/2010/04/16/install-php-5-2-x-in-ubuntu-10-04-lucid/" target="_blank">http://mrkandy.wordpress.com/2010/04/16/install-php-5-2-x-in-ubuntu-10-04-lucid/</a> and I have to give all credit to the writer of that article. None of this was my own work, I just stumbled across the post above and it fixed all my problems (I&#8217;m hoping that it&#8217;ll help out some of my readers as well).</p>
<p>Anyway, here are the steps. It basically does the following: Remove all PHP packages, pin all PHP packages to karmic, add karmic to sources, and then reinstall the PHP packages which were previously installed.</p>
<pre class="brush:bash">php_installed=`dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`

# remove all php packge
sudo aptitude purge $php_installed

# use karmic for php pakage
# pin-params:  a (archive), c (components), v (version), o (origin) and l (label).
echo -e "Package: php5\nPin: release a=karmic\nPin-Priority: 991\n"  | sudo tee /etc/apt/preferences.d/php > /dev/null
apt-cache search php5-|grep php5-|awk '{print "Package:", $1,"\nPin: release a=karmic\nPin-Priority: 991\n"}'|sudo tee -a /etc/apt/preferences.d/php > /dev/null
apt-cache search -n libapache2-mod-php5 |awk '{print "Package:", $1,"\nPin: release a=karmic\nPin-Priority: 991\n"}'| sudo tee -a /etc/apt/preferences.d/php > /dev/null
echo -e "Package: php-pear\nPin: release a=karmic\nPin-Priority: 991\n"  | sudo tee -a /etc/apt/preferences.d/php > /dev/null

# add karmic to source list
egrep '(main restricted|universe|multiverse)' /etc/apt/sources.list|grep -v "#"| sed s/lucid/karmic/g | sudo tee /etc/apt/sources.list.d/karmic.list > /dev/null

# update package database (use apt-get if aptitude crash)
sudo apt-get update

# install php
sudo apt-get install $php_installed
# or sudo aptitude install -t karmic php5-cli php5-cgi //for fcgi
# or  sudo apt-get install -t karmic  libapache2-mod-php5 //for apache module

sudo aptitude hold `dpkg -l | grep php5| awk '{print $2}' |tr "\n" " "`
#done</pre>
<p>And that&#8217;s it. As I said previously, all credit should go to the author of <a href="http://mrkandy.wordpress.com/2010/04/16/install-php-5-2-x-in-ubuntu-10-04-lucid/">this post</a>.</p>
<p><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.monkeedev.co.uk/blog/2010/09/14/downgrade-php-to-5-2-in-ubuntu-10-04/&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2010%2F09%2F14%2Fdowngrade-php-to-5-2-in-ubuntu-10-04%2F&amp;title=Downgrade+PHP+to+5.2+in+Ubuntu+10.04" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2010%2F09%2F14%2Fdowngrade-php-to-5-2-in-ubuntu-10-04%2F&amp;title=Downgrade+PHP+to+5.2+in+Ubuntu+10.04" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2010%2F09%2F14%2Fdowngrade-php-to-5-2-in-ubuntu-10-04%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2010%2F09%2F14%2Fdowngrade-php-to-5-2-in-ubuntu-10-04%2F&amp;title=Downgrade+PHP+to+5.2+in+Ubuntu+10.04" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2010%2F09%2F14%2Fdowngrade-php-to-5-2-in-ubuntu-10-04%2F&amp;title=Downgrade+PHP+to+5.2+in+Ubuntu+10.04" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2010%2F09%2F14%2Fdowngrade-php-to-5-2-in-ubuntu-10-04%2F&amp;title=Downgrade+PHP+to+5.2+in+Ubuntu+10.04" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2010%2F09%2F14%2Fdowngrade-php-to-5-2-in-ubuntu-10-04%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Downgrade+PHP+to+5.2+in+Ubuntu+10.04+@+http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2010%2F09%2F14%2Fdowngrade-php-to-5-2-in-ubuntu-10-04%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.monkeedev.co.uk/blog/2010/09/14/downgrade-php-to-5-2-in-ubuntu-10-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to upgrade Debian Etch to Lenny</title>
		<link>http://www.monkeedev.co.uk/blog/2009/03/21/how-to-upgrade-debian-etch-to-lenny/</link>
		<comments>http://www.monkeedev.co.uk/blog/2009/03/21/how-to-upgrade-debian-etch-to-lenny/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 10:52:38 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[aptitude]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[etch]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.monkeedev.co.uk/blog/?p=83</guid>
		<description><![CDATA[I finally decided to take the plunge and upgrade a few of my Etch servers to Lenny, and the process was a lot less painful than I was expecting. These are basically the steps from the official manual, but I cant guarantee that your system will upgrade as easily as mine &#8211; as always when [...]]]></description>
			<content:encoded><![CDATA[<p>I finally decided to take the plunge and upgrade a few of my Etch servers to Lenny, and the process was a lot less painful than I was expecting.</p>
<p>These are basically the steps from the official manual, but I cant guarantee that your system will upgrade as easily as mine &#8211; as always when  upgrading you should backup your data and be prepared for the worst.</p>
<p>Usually I prefer apt-get over aptitude, but the official documentation recommends aptitude to do the upgrade, so heres what you need to do (as root)</p>
<p>First, edit /etc/apt/sources.list and change all mentions of etch to lenny. If you use vim, you can simply do the following:</p>
<blockquote><p>vim /etc/apt/sources.list<br />
(then, in vim)<br />
:%s/etch/lenny/g<br />
:wq</p></blockquote>
<p>Then update&#8230;</p>
<blockquote><p>aptitude update</p></blockquote>
<p>At this point, you might receive the following error (I did on every server I upgraded)</p>
<blockquote><p>W: There is no public key available for the following key IDs:<br />
4D270D06F42584E6</p>
<p>W: You may want to run apt-get update to correct these problems</p></blockquote>
<p>To fix this, you need to install the following:</p>
<blockquote><p>aptitude install debian-archive-keyring<br />
aptitude update</p></blockquote>
<p>Now you&#8217;re ready to do the upgrade. The safest way to do this is in 3 parts</p>
<blockquote><p>aptitude install aptitude<br />
(updating apt first is a safe way of doing things)<br />
aptitude upgrade<br />
(when this finishes)<br />
aptitude dist-upgrade</p></blockquote>
<p>When this has finished, your system is upgraded to Lenny! All you need to do now is reboot, and hopefully the system will come back up and be running Lenny.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2009%2F03%2F21%2Fhow-to-upgrade-debian-etch-to-lenny%2F&amp;title=How+to+upgrade+Debian+Etch+to+Lenny" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2009%2F03%2F21%2Fhow-to-upgrade-debian-etch-to-lenny%2F&amp;title=How+to+upgrade+Debian+Etch+to+Lenny" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2009%2F03%2F21%2Fhow-to-upgrade-debian-etch-to-lenny%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2009%2F03%2F21%2Fhow-to-upgrade-debian-etch-to-lenny%2F&amp;title=How+to+upgrade+Debian+Etch+to+Lenny" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2009%2F03%2F21%2Fhow-to-upgrade-debian-etch-to-lenny%2F&amp;title=How+to+upgrade+Debian+Etch+to+Lenny" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2009%2F03%2F21%2Fhow-to-upgrade-debian-etch-to-lenny%2F&amp;title=How+to+upgrade+Debian+Etch+to+Lenny" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2009%2F03%2F21%2Fhow-to-upgrade-debian-etch-to-lenny%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+How+to+upgrade+Debian+Etch+to+Lenny+@+http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2009%2F03%2F21%2Fhow-to-upgrade-debian-etch-to-lenny%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.monkeedev.co.uk/blog/2009/03/21/how-to-upgrade-debian-etch-to-lenny/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

