<?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>utz.cc</title>
	<atom:link href="http://utz.cc/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://utz.cc/blog</link>
	<description>adventures in programming</description>
	<lastBuildDate>Sun, 07 Mar 2010 19:47:36 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Enabling The Multiverse Repository On Ubuntu</title>
		<link>http://utz.cc/blog/2010/03/enabling-the-multiverse-repository-on-ubuntu/</link>
		<comments>http://utz.cc/blog/2010/03/enabling-the-multiverse-repository-on-ubuntu/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 18:15:50 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://utz.cc/blog/?p=61</guid>
		<description><![CDATA[If you need to install the Sun JDK or some other non-free software on Ubuntu, you&#8217;ll likely need to enable the multiverse repository.  To do this from the command line, you&#8217;ll need to modify the file /etc/apt/sources.list.
The file /etc/apt/sources.list looks like this:

deb http://archive.ubuntu.com/ubuntu/ karmic main restricted universe
deb-src http://archive.ubuntu.com/ubuntu/ karmic main restricted universe
&#160;
deb http://archive.ubuntu.com/ubuntu/ karmic-updates [...]]]></description>
			<content:encoded><![CDATA[<p>If you need to install the Sun JDK or some other non-free software on Ubuntu, you&#8217;ll likely need to enable the multiverse repository.  To do this from the command line, you&#8217;ll need to modify the file /etc/apt/sources.list.</p>
<p>The file /etc/apt/sources.list looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">deb http://archive.ubuntu.com/ubuntu/ karmic main restricted universe
deb-src http://archive.ubuntu.com/ubuntu/ karmic main restricted universe
&nbsp;
deb http://archive.ubuntu.com/ubuntu/ karmic-updates main restricted universe
deb-src http://archive.ubuntu.com/ubuntu/ karmic-updates main restricted universe
&nbsp;
deb http://security.ubuntu.com/ubuntu karmic-security main restricted universe
deb-src http://security.ubuntu.com/ubuntu karmic-security main restricted universe</pre></div></div>

<p>To enable the multiverse repository, add the word multiverse after each occurrence of the word universe. The file should then look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">deb http://archive.ubuntu.com/ubuntu/ karmic main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ karmic main restricted universe multiverse
&nbsp;
deb http://archive.ubuntu.com/ubuntu/ karmic-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ karmic-updates main restricted universe multiverse
&nbsp;
deb http://security.ubuntu.com/ubuntu karmic-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu karmic-security main restricted universe multiverse</pre></div></div>

<p>After running the command apt-get update, you should be able to install packages within the multiverse repository.</p>
]]></content:encoded>
			<wfw:commentRss>http://utz.cc/blog/2010/03/enabling-the-multiverse-repository-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Determining What A Program Is Linked To</title>
		<link>http://utz.cc/blog/2010/03/determining-what-a-program-is-linked-to/</link>
		<comments>http://utz.cc/blog/2010/03/determining-what-a-program-is-linked-to/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 05:17:37 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://utz.cc/blog/?p=53</guid>
		<description><![CDATA[To determine what shared objects a program is linked to, use the ldd command.  For example, running this command:

ldd /usr/bin/curl

gives the following output on my Ubuntu 9.10 box:

	linux-vdso.so.1 =&#62;  (0x00007fffb6b78000)
	libcurl.so.4 =&#62; /usr/lib/libcurl.so.4 (0x00007f9226904000)
	libz.so.1 =&#62; /lib/libz.so.1 (0x00007f92266ed000)
	libc.so.6 =&#62; /lib/libc.so.6 (0x00007f922637e000)
	librt.so.1 =&#62; /lib/librt.so.1 (0x00007f9226176000)
	libidn.so.11 =&#62; /usr/lib/libidn.so.11 (0x00007f9225f43000)
	liblber-2.4.so.2 =&#62; /usr/lib/liblber-2.4.so.2 (0x00007f9225d35000)
	libldap_r-2.4.so.2 =&#62; /usr/lib/libldap_r-2.4.so.2 (0x00007f9225aec000)
	libgssapi_krb5.so.2 =&#62; /usr/lib/libgssapi_krb5.so.2 [...]]]></description>
			<content:encoded><![CDATA[<p>To determine what shared objects a program is linked to, use the ldd command.  For example, running this command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ldd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>curl</pre></div></div>

<p>gives the following output on my Ubuntu 9.10 box:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">	linux-vdso.so.1 =&gt;  (0x00007fffb6b78000)
	libcurl.so.4 =&gt; /usr/lib/libcurl.so.4 (0x00007f9226904000)
	libz.so.1 =&gt; /lib/libz.so.1 (0x00007f92266ed000)
	libc.so.6 =&gt; /lib/libc.so.6 (0x00007f922637e000)
	librt.so.1 =&gt; /lib/librt.so.1 (0x00007f9226176000)
	libidn.so.11 =&gt; /usr/lib/libidn.so.11 (0x00007f9225f43000)
	liblber-2.4.so.2 =&gt; /usr/lib/liblber-2.4.so.2 (0x00007f9225d35000)
	libldap_r-2.4.so.2 =&gt; /usr/lib/libldap_r-2.4.so.2 (0x00007f9225aec000)
	libgssapi_krb5.so.2 =&gt; /usr/lib/libgssapi_krb5.so.2 (0x00007f92258be000)
	libssl.so.0.9.8 =&gt; /lib/libssl.so.0.9.8 (0x00007f9225670000)
	libcrypto.so.0.9.8 =&gt; /lib/libcrypto.so.0.9.8 (0x00007f92252e9000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f9226b4b000)
	libpthread.so.0 =&gt; /lib/libpthread.so.0 (0x00007f92250cd000)
	libresolv.so.2 =&gt; /lib/libresolv.so.2 (0x00007f9224eb4000)
	libsasl2.so.2 =&gt; /usr/lib/libsasl2.so.2 (0x00007f9224c9a000)
	libgnutls.so.26 =&gt; /usr/lib/libgnutls.so.26 (0x00007f92249f8000)
	libkrb5.so.3 =&gt; /usr/lib/libkrb5.so.3 (0x00007f9224740000)
	libk5crypto.so.3 =&gt; /usr/lib/libk5crypto.so.3 (0x00007f9224515000)
	libcom_err.so.2 =&gt; /lib/libcom_err.so.2 (0x00007f9224311000)
	libkrb5support.so.0 =&gt; /usr/lib/libkrb5support.so.0 (0x00007f9224109000)
	libdl.so.2 =&gt; /lib/libdl.so.2 (0x00007f9223f05000)
	libkeyutils.so.1 =&gt; /lib/libkeyutils.so.1 (0x00007f9223d02000)
	libtasn1.so.3 =&gt; /usr/lib/libtasn1.so.3 (0x00007f9223af1000)
	libgcrypt.so.11 =&gt; /lib/libgcrypt.so.11 (0x00007f9223879000)
	libgpg-error.so.0 =&gt; /lib/libgpg-error.so.0 (0x00007f9223675000)</pre></div></div>

<p>The items left of the arrows are the libraries expected by the program.  The items right of the arrows are the absolute paths of the libraries found by searching the directories listed in the LD_LIBRARY_PATH variable and the directories listed in /etc/ld.so.conf.</p>
]]></content:encoded>
			<wfw:commentRss>http://utz.cc/blog/2010/03/determining-what-a-program-is-linked-to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using LD_LIBRARY_PATH</title>
		<link>http://utz.cc/blog/2010/02/using-ld_library_path/</link>
		<comments>http://utz.cc/blog/2010/02/using-ld_library_path/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 15:34:45 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://utz.cc/blog/?p=24</guid>
		<description><![CDATA[When testing an application, it&#8217;s often useful to install it outside of the standard directories /usr and /usr/local.  This technique makes it easy to delete the application should you want to get rid of it, since its files won&#8217;t be strewn about other files you&#8217;d like to keep.
If the application only uses shared objects stored [...]]]></description>
			<content:encoded><![CDATA[<p>When testing an application, it&#8217;s often useful to install it outside of the standard directories /usr and /usr/local.  This technique makes it easy to delete the application should you want to get rid of it, since its files won&#8217;t be strewn about other files you&#8217;d like to keep.</p>
<p>If the application only uses shared objects stored in /usr/lib and /usr/local/lib (or other directories listed in /etc/ld.so.conf), then running it is usually as simple as invoking it from a command line.  However, if it uses shared objects outside those listed in /etc/ld.so.conf, when running it you&#8217;ll see errors such as this one:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">./myapp: error while loading shared libraries: libmylib.so: cannot open shared object file: No such file or directory</pre></div></div>

<p>The solution is to set the environment variable LD_LIBRARY_PATH before executing the application. For example, if libmylib.so is contained in the directory /path/to/lib, then setting LD_LIBRARY_PATH as follows</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LD_LIBRARY_PATH</span>=<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>lib:<span style="color: #007800;">$LD_LIBRARY_PATH</span></pre></div></div>

<p>enables myapp to find libmylib.so when executed.</p>
<p>For more information about the LD_LIBRARY_PATH environment variable and shared objects, see <a href="http://www.yolinux.com/TUTORIALS/LibraryArchives-StaticAndDynamic.html">yolinux.com&#8217;s tutorial</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://utz.cc/blog/2010/02/using-ld_library_path/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
