<?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>Open-Moments &#187; software</title>
	<atom:link href="http://open-moments.com/tag/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://open-moments.com</link>
	<description>Linux, programming and other geeky stuff</description>
	<lastBuildDate>Mon, 09 Jan 2012 08:25:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Uninstalling Software</title>
		<link>http://open-moments.com/2012/01/08/uninstalling-software/</link>
		<comments>http://open-moments.com/2012/01/08/uninstalling-software/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 14:30:44 +0000</pubDate>
		<dc:creator>deathadder</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[bz]]></category>
		<category><![CDATA[deb]]></category>
		<category><![CDATA[gz]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[remove]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tar]]></category>
		<category><![CDATA[uninstall]]></category>

		<guid isPermaLink="false">http://open-moments.com/?p=26</guid>
		<description><![CDATA[Here I will explain the ways to uninstall software you installed via source code, Debian and Red Hat packages. To remove software you&#8217;ll need to run the commands below as the root user. Source code (tar.gz / tar.bz2) Debian Packages (debs) Red Hat Packages (rpms) Source code To uninstall from source it is easiest to [...]]]></description>
			<content:encoded><![CDATA[<p>Here I will explain the ways to uninstall software you installed via source code, Debian and Red Hat packages. To remove software you&#8217;ll need to run the commands below as the <a title="Change to root user" href="http://open-moments.com/2012/01/08/installing-software/#su" target="_blank">root user</a>.</p>
<p><a href="#src">Source code (tar.gz / tar.bz2)</a><br />
<a href="#deb">Debian Packages (debs)</a><br />
<a href="#rpm">Red Hat Packages (rpms)</a></p>
<h3><a name="src"></a>Source code</h3>
<p>To uninstall from source it is easiest to keep the directory you installed from around after installation. Assuming that the directory you installed the application from was /home/user/src/foo-2.1.2 you will need to change into that directory as root. Once you are within that directory you need to issue the command make uninstall. A typical uninstall would look like this.</p>
<p><code>[root@host ~]# cd ~user/src/foo-2.1.2<br />
[root@host /home/user/src/foo-2.1.2]# make uninstall<br />
list='foo'; for p in $list;<br />
do rm -f /usr/local/sbin/'echo $p|sed 's/$//'|sed 's,x,x,'|sed's/$//''; done make uninstall-man8 make[1]: Entering directory<br />
'/usr/local/src/foo-2.1.2'<br />
rm -f /usr/local/man/man8/foo.8 make[1]:<br />
Leaving directory '/usr/local/src/foo-2.1.2'</code></p>
<p>If you get the error below, then you&#8217;re unable to run make install for the software package and should read the README and INSTALL files to see if there are any instructions on uninstalling. Failing that you will have to check documentation on the projects website / forums etc to see which files need to be removed from your system.</p>
<p><code>make: *** No rule to make target 'unistall'. Stop.</code></p>
<h3><a name="deb"></a>Debian Packages</h3>
<p>Uninstalling DEB files is as simple as their installation, lets assume we installed the file foo-2.1.2.deb which provided the package foo. You would need to switch to <a title="Change to root user" href="http://open-moments.com/2012/01/08/installing-software/#su">root</a> and run the dpkg command like so:</p>
<p><code>[root@host ~]# dpkg -r foo</code></p>
<p>If there are no error messages this will have removed the foo package from your system.</p>
<h3><a name="rpm"></a>Red Hat Packages</h3>
<p>Uninstalling RPM packages requires you to be <a title="Change to root user" href="http://open-moments.com/2012/01/08/installing-software/#su">root</a> and use the rpm command. If the RPM installed was foo-2.1.2.rpm and provided the package foo you would uninstall it with:</p>
<p><code>[root@host ~]# rpm -e foo</code></p>
<p>If there aren&#8217;t any error messages you would have removed the application from your system. As with software installation it is recommended to use a package manager for removing software.</p>
]]></content:encoded>
			<wfw:commentRss>http://open-moments.com/2012/01/08/uninstalling-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Software</title>
		<link>http://open-moments.com/2012/01/08/installing-software/</link>
		<comments>http://open-moments.com/2012/01/08/installing-software/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 12:38:58 +0000</pubDate>
		<dc:creator>deathadder</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[bz]]></category>
		<category><![CDATA[deb]]></category>
		<category><![CDATA[gz]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tar]]></category>

		<guid isPermaLink="false">http://open-moments.com/?p=11</guid>
		<description><![CDATA[There are a number of ways to install software within Linux using the command line, you can compile the source code yourself, or use a precompiled binary. Here I plan on explaining how to install software using the main methods, these are: Source code (tar.gz / tar.bz2) Debian Packages (debs) Red Hat Packages (rpms) However [...]]]></description>
			<content:encoded><![CDATA[<p>There are a number of ways to install software within Linux using the command line, you can compile the source code yourself, or use a precompiled binary. Here I plan on explaining how to install software using the main methods, these are:</p>
<p><a href="#src">Source code (tar.gz / tar.bz2)</a><br />
<a href="#deb">Debian Packages (debs)</a><br />
<a href="#rpm">Red Hat Packages (rpms)</a></p>
<p>However these are not the only ways of installing software, distributions have package managers which can take care of installing dependices and updates for packages. Which is why it is always recommended to use a Package Manager, with that in mind the below explains how to install software manually.</p>
<h3><a name="su"></a>Changing to the administrator (root)</h3>
<p>Linux, and Unix, has only one administrator user called root. To make any changes to the system in general you will need to use the root account. To do this you use the &#8216;su&#8217; command, you will need to enter the root password when prompted. If you enter the incorrect password you will either get prompted to enter the password again or be returned to the shell. If you do get returned to the shell you can simple try the command again. You can use the command like so:</p>
<p><code>[user@host ~]$ su -<br />
Password:<br />
[root@host ~]#</code></p>
<p>An alternative to using su is the command sudo, which runs individual commands as the root user, Ubuntu based distros uses sudo instead of a normal root user, so you would prepend sudo to your commands, for example:</p>
<p><code>[user@host ~]$ sudo dpkg -i foo.deb</code></p>
<p>If you are running Ubuntu, or Ubuntu based system, when I mention root, simply prepend sudo to the command.</p>
<h3><a name="src"></a>Source code</h3>
<p>Source packages are simple compressed source code, generally a tar.gz or tar.bz2. To install these you need to decompress the source code, configure it, and then compile it, this has the advantage of allowing you to optimise the process so that the application is built for your specific hardware instead of a generic build. However, for large applications like OpenOffice for example, the compliation process can take several hours with a end result that makes the application load a second or two faster. Having said that the steps generally undertake for source pacakges are the following:</p>
<ol>
<li>uncompress</li>
<li>configure</li>
<li>compile application</li>
<li>move files into correct directories</li>
</ol>
<p>For the purpose of this I am going to assume you have downloaded the application foo version 2.1.2 into a Downloads folder in your home directory. To uncompress the source you need to run one of the following commands from within a terminal:</p>
<p><code>user@host:~/Downloads$ tar zxvf foo-2.1.2.tar.gz</code></p>
<p>Or</p>
<p><code>user@host:~/Downloads$ tar jxvf foo-2.1.2.tar.bz2</code></p>
<p>Each of the above will uncompress the file you&#8217;ve downloaded, the standard is that the code will get extracted into a folder that is named the same as the compress file without the extension, for this example that would be foo-2.1.2, now you need to change into that directory using the &#8216;cd&#8217; command. Inside the newly created directory you should be able to see a few different files, the INSTALL and README files are the most important and you should read both of these files as they give you specific information about how to install your newly downloaded software. You can read these files using the &#8216;less&#8217; command, to move to the &#8220;next page&#8221; use the space bar. So the commands for change into our directory and reading our files are:</p>
<p><code>user@host:~/Downloads$ cd foo-2.1.2<br />
user@host:~/Downloads/foo-2.1.2$ less INSTALL<br />
user@host:~/Downloads/foo-2.1.2$ less README</code></p>
<p>Now you know of any specific requirements for installing the source code you can start the process of configuring and compiling your software. To setup the source so you can start compiling it you need to run the configure script, this will check that all of the dependencies for a application are present on the system and that all of the source files are present. To run this script you use the following, included is some typical output.</p>
<p><code>user@host:~/Downloads/foo-2.1.2$ ./configure<br />
checking for a BSD-compatible install... /usr/bin/install -c<br />
checking whether build environment is sane... yes<br />
checking for a thread-safe mkdir -p... /bin/mkdir -p<br />
checking for gawk... no<br />
checking for mawk... mawk<br />
checking whether make sets $(MAKE)... yes<br />
checking whether to enable maintainer-specific portions of Makefiles... no</code></p>
<p>If configure runs successfully you&#8217;ll see configure create a number of files like the Makefile, some example output is below. If the configure process fails you will see some out put that describes what application or library is missing, to fix this you will need to install the package listed and rerun configure. You can pass flags to configure to optimise the process, this will be described for you in the INSTALL/README files.</p>
<p><code>config.status: creating Makefile<br />
config.status: creating icons/Makefile<br />
config.status: creating icons/16x16/Makefile<br />
config.status: creating tagmanager/Makefile<br />
config.status: creating tagmanager/include/Makefile<br />
config.status: creating scintilla/Makefile<br />
config.status: creating scintilla/include/Makefile<br />
config.status: creating src/Makefile<br />
config.status: creating plugins/Makefile<br />
config.status: creating po/Makefile.in<br />
config.status: creating doc/Makefile<br />
config.status: creating doc/geany.1<br />
config.status: creating geany.spec<br />
config.status: creating geany.pc<br />
config.status: creating doc/Doxyfile<br />
config.status: creating config.h<br />
config.status: executing depfiles commands<br />
config.status: executing default-1 commands<br />
config.status: executing po/stamp-it commands</code></p>
<p>Once the configuration has completed it is time to compile the source code, this is done using the make command like so:</p>
<p><code>user@host:~/Downloads/foo-2.1.2$ make<br />
gcc -DHAVE_CONFIG_H -I. -I.. -I./../scintilla/include<br />
-I./../tagmanager/include -I/usr/include/gtk-2.0<br />
-I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo<br />
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0<br />
-I/usr/lib/glib-2.0/include -I/usr/include/pixman-1<br />
-I/usr/include/freetype2 -I/usr/include/libpng12<br />
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include<br />
-DGEANY_DATADIR=""/usr/local/share""<br />
-DGEANY_DOCDIR=""/usr/local/share/doc/geany""<br />
-DGEANY_LIBDIR=""/usr/local/lib""<br />
-DGEANY_LOCALEDIR=""/usr/local/share/locale""<br />
-DGEANY_PREFIX=""/usr/local"" -g -O2 -MT main.o -MD -MP -MF<br />
.deps/main.Tpo -c -o main.o main.c</code></p>
<p>The output from make will be more or less meaningless to you, don&#8217;t worry about that. All you need to look out for are any errors, these will generally result in make stopping. The common reasons for make stopping during a compliation is that it&#8217;s unable to find the development packages needed. However the help files or websites for the application should be able to help you. Failing that any problems can be Goggled. Once the make process has finished it&#8217;s time for you to install the application, this basically means moving the files into the correct locations on your computer. This is done by using the &#8216;make install&#8217; process, since it will be moving files onto sections of the drive that your user does not have write access too, for example /usr/bin, you will need to do this as the <a href="#su">root user</a>, if you&#8217;re not sure how to do this have a read of changing to root. Once you&#8217;re logged in as the root user you&#8217;ll have to change to the directory that contains the source code and run make install for example.</p>
<p><code>root@host:~/# cd ~user/Downloads/foo-2.1.2<br />
root@host:/home/user/Downloads/foo-2.1.2# make install</code></p>
<p>The output shown will be the locations of files as they&#8217;re moved. Unless there is an error the process was successful, errors will be shown similiar to.</p>
<p><code>install: cannot stat 'foo/bar/install.cpp': No such file or directory<br />
make: *** [install] Error 1</code></p>
<p>If when you run make install and get errors the quickest way to get them fixed is look on the projects website and forums or searching on Google. Some of the error may be simple to understand, for example a missing application, in which case you can install the application required and try the process again. If you run make install and no errors are displayed the application should have installed successfully and you user can then run the application like any other application from the command line. Application menu short cuts may not be provided for all applications, the way to add to your menus is out of scope for this page and can be fixed by reading the documentation for your desktop environment.</p>
<h3><a name="deb"></a>Debian Packages</h3>
<p>Debian packages are precompiled binaries, this means that someone has undertaken the task of compiling the source code and has provided a package that can be extract, basically, into the right locations on your computer. Within Debian based system you use the application dpkg to install debs. To install these packages you will need to issue the following command as the <a href="#su">root user</a>:</p>
<p><code>root@host~/# dpkg -i foo-2.1.2.deb</code></p>
<p>This will install the application you&#8217;ve downloaded as long as all of the required software / libraries can be found on your computer you may however run into the problem of missing dependcies, if you see a message like:</p>
<p><code>Unpacking replacement foo ...<br />
dpkg: dependency problems prevent configuration of foo:<br />
foo depends on bar; however:<br />
Package bar is not configured yet.</code></p>
<p>You will need to install the package bar and then try to reinstall foo-2.1.2.deb.</p>
<h3><a name="rpm"></a>Red Hat Packages</h3>
<p>Red Hat packages are, like debs, precompiled binaries. As such you will need to install them as the <a href="#su">root user</a> using the following command:</p>
<p><code>root@host~/# rpm -ivh foo-1.5.7.rpm<br />
Preparing.... ###################################### [100%]<br />
1: foo ###################################### [100%]</code></p>
<p>This will install the application foo, however as with the other methods of installing software described here, it does not handle dependencies for the applications you&#8217;re installing, so if you&#8217;re faced with a message similiar to:</p>
<p><code>error: Failed dependencies:<br />
libbar.so.0 is needed by foo-2.1.2</code></p>
<p>You will need to install the shared library libbar. Package managers provide a means to install dependenices for you and keep your software up-to-date as such it&#8217;s recommended to use those when ever possible!</p>
]]></content:encoded>
			<wfw:commentRss>http://open-moments.com/2012/01/08/installing-software/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

