View Full Version : openSUSE software installation hints

21-Dec-2009, 08:18
openSUSE software installation hints

Comments on this how to can be made on this thread here: openSUSE software installation hints - openSUSE Forums (http://forums.opensuse.org/new-user-how-faq-read-only/unreviewed-how-faq/427460-opensuse-software-installation-hints.html)

If the software version you wish to use is not available on the official OSS nor non-OSS, nor Update repositories, nor on the Packman repository, then you can search to see if someone else has packaged it for openSUSE.

RPM Search Engines

The two good search engines noted are:

Packman packages (http://packman.links2linux.de/search) [Note this search engine will search for packages packaged by the Packman packagers]
Software.openSUSE.org (http://software.opensuse.org/search) [Pay careful attention to the options on this search page, because by deselecting "Exclude user's home projects" one can access a massive number of rpms packaged by home users (with a corresponding risk that such rpms may have had little to no testing). Note also this Search engine does NOT access packages packaged by the packman packagers].


Now if you find the version you wish there, you can install via the single click install (which I dislike because of a lack of control/insight over what it does) or you can add the repository listed that has the version of the app you want, install the app, and then remove the repository. This is easy with zypper via:

zypper ar <some-repos> <arbitrary-repos-name-you-create> #add repository
zypper install <application-you-want> #install the application
zypper rr <arbitrary-repos-name-you-create> #remove the repositoryFor example, lets say you wish to install the application bluefish, but it is not in OSS, nor non-OSS, nor Update, nor Packman. So you search "opensuse search.org) and get this hit: openSUSE-11.4 search results for bluefish (http://software.opensuse.org/search?q=bluefish&baseproject=openSUSE%3A11.4&lang=en&exclude_debug=true) and you note a stable version is in the Education repos (lets avoid unstable development versions):
http://download.opensuse.org/repositories/Education/openSUSE_11.4So to install by zypper you simply type:
zypper ar http://download.opensuse.org/repositories/Education/openSUSE_11.4 education
zypper install bluefish
zypper rr education and now bluefish is installed, and you have removed the education repository for now. You can always add it again some time.

If you are curious to see more about bluefish after installing, type:
rpm -qi bluefishIf you want to see what files came with bluefish after installing, type:
rpm -ql bluefishIf you want a list of all files that you have installed, in chronological order, type:
rpm -qa --last ... and if that scrolls by the screen too fast, re-direct it to a file so you can open the file with a text editor ... i.e. :
rpm -qa --last > my-rpms.txt and in KDE type "kwrite my-rpms.txt" and in GNOME type "gedit my-rpms.txt" and in LXDE type "beaver my-rpms.txt" to see the list of installed rpms that you just created.


The command zypper (described above) provides a good front end for installing an rpm, that looks after the "dependencies" for an application. However one can install right from the very basic rpm command, although in most cases using the rpm command is NOT the recommend method for new users to install. In such a case, one must download the rpm file to one's computer, and then navigate to the directory where the downloaded file is stored and install it with the rpm command.

A command for installing an rpm (say application.rpm) is:

rpm -ivh application.rpm If an earlier version of the application "application.rpm" is already installed, then dependent on the content of "application.rpm" it may or it may not, replace the original application software, or it may be installed in addition to the old version. Hence to replace the software for certain, many times the following "update" rpm command is recommended instead:

rpm -Uvh application.rpm Do a search on google for "rpm" to learn more about the command.


Also, sometimes upon a new release, one finds an old application that was available for a previous openSUSE release is not available for the current release. Say it was available for openSUSE-11.2 but not 11.3. But you wish to use it for 11.3. Then if you can find the rpm " .src " file, you can easily rebuild the rpm in SOME (not all) cases.

Before trying to rebuild, you should ensure you have the necessary tools to do so, which typically means one only needs to go to YaST > Software > Software Management and install the "base-development" pattern. Alternatively, one could simply run as a regular user:

su -c 'zypper install -t pattern devel_basis'and enter root password when prompted and that will install MANY packages that are useful for development and rebuilding an rpm.

For example, lets say you wish to use the application "tea" under openSUSE-11.3 and we will assume an imaginary case where the packman packagers packaged it for openSUSE-11.2 but not 11.3 (this is just an example - in fact Packman packagers HAVE packaged this for 11.3 but I simply want to use this example). So you find the 11.2 version of tea here:Packman website packaged package tea (http://packman.links2linux.de/package/tea) (for 11.2) and you note the rpm source/spec file for tea here: http://packman.links2linux.de/downloadsource/225753/tea-29.0.2-1.pm.1.2.src.rpm

Then download that source file to your /home/username directory, and on your openSUSE-11.3 PC try to rebuild it as a REGULAR user with:

rpmbuild --rebuild tea-29.0.2-1.pm.1.2.src.rpm and sometimes that will create the rpm for 11.3. It may ask that you install some dependencies, so this could be an iterative process before you succeed. For example, say it notes that it also needs "aspell-devel" and "libqt4-devel' to install. So you can install this with:

su -c 'zypper in aspell-devel libqt4-devel' and after that is successful, again as a REGULAR user try with:
rpmbuild --rebuild tea-29.0.2-1.pm.1.2.src.rpm<some-repos><arbitrary-repos-name-you-create><application-you-want><arbitrary-repos-name-you-create>
Then if you succeed in rebuilding the rpm for 11.3, you will find the built rpms here /usr/src/packages/RPMS under the appropriate architecture (i386, i586, x86_64 ... ) , and you can simply install it with zypper.

Note in the case of openSUSE-12.2 the application 'rpmbuild' is no longer packaged by openSUSE packagers as part of 'rpm' but rather is packaged as the stand alone application 'rpm-build' and the package it creates will instead be under /home/your-user-name/rpmbuld/ ...


But lets say the application is NOT there at all, no rpm, nor rpm source file, and you desperately need it. Well what many of us do is go to the Packman mailing list and ask that one of the packman packagers package the application for us. Packman Info Page (http://lists.links2linux.de/cgi-bin/mailman/listinfo/packman)


But lets say no one will package this for you.

You could then compile it yourself, which dependent on the application may be difficult or easy.

Before trying to custom compile, you should ensure you have the necessary tools to do so, which typically means one only needs to go to YaST > Software > Software Management and install the "base-development" pattern. Alternatively, one could simply run as a regular user:

su -c 'zypper install -t pattern devel_basis' and enter root password when prompted and that will install MANY packages that are useful for development and compiling on one's own PC.

Then to custom compile an application, typically one needs to download a "tarball" (application.tar.gz file) from the developers web site, uncompress the file, and do a custom compilation. Its important one read the "readme.txt" file and "install.txt" file in such a case. However if you do compile it yourself, it will NOT be tracked by the rpm database, unless you install it via an rpm. Some of us use "checkinstall" application to create cheap and dirty rpms (not for sharing but good for one's own use). Checkinstall can be used by doing:

checkinstalland install the created rpm, or if that does not work:

make install
checkinstalland install the created rpm on top of the already installed applications.


My recommendation is users stick with 5 and only 5 repositories. Those 5 are:

OSS (The main official openSUSE repository, open source software only),
Non-OSS (The main official openSUSE non free (as in freedom) software repository, for software such as Flashplayer, Java, Opera, IPW-firmware, ... etc ... ) ,
Update-OSS (The main official openSUSE repository for official security and bugfix updates for OSS above),
Update-NON-OSS (The main official openSUSE non free (as in freedom) software repository for official security and bugfix updates for NON-OSS above), and
Packman (The largest unofficial community 3rd party repository for openSUSE, which offers many various additional and replacment/non-media-crippled Packages).

The chances are OSS, Non-OSS, Update-OSS and Update-Non-OSS are already setup, and you just need to add Packman. Again be cautious about adding more than ONLY those 5. If you add others you could have dependency problems. I recommend you add others ONLY as needed and consider IMMEDIATELY disabling or removing them after you install what you need.

Again, software can be managed under openSUSE with Zypper: Using Zypper (http://en.opensuse.org/Zypper/Usage)

or by going to YaST > Software > Software Management.

Note one can get a nice list of their repositories, by typing the following command as a regular user:

zypper lr -d This post originated out of a discussion on this thread: Question about software installation - openSUSE Forums (http://forums.opensuse.org/applications/427412-question-about-software-installation.html)

If believed useful, we can move possibly stickie it in our New Users top level section. Please advise !!

Revision-1 : (21-Dec-09) Added more detail on compiling from a tarball (which is NOT the recommended way for new users to install software)
Revision-2 : (21-Dec-09) Added information on installing software with the basic rpm command
Revision-3 : (26-Dec-09) Added location where built rpm files (using rpmbuild --rebuild) are located
Revision-4 : (16-Dec-10) Added some additional rpm commands and clarified difference between 2 search engines
Revision-5 : (17-Dec-10) Added some additional information on repository management</arbitrary-repos-name-you-create></application-you-want></arbitrary-repos-name-you-create></some-repos>
Revision-6 : (24-Apr-11) Updated to be consistent with non-functionality of webpin search engine and for changes in packman packager packages and added instructions on how to install base-development pattern which is useful for custom compilation or rebuilding an rpm.
Revision-7: (19-Feb-12) Updated to reflect changes coming in openSUSE-12.2
Revision-8: (15-March-19) Updated to reflect update to OSS and Non-OSS in separate repositories.