openSUSE software installation hints

openSUSE software installation hints

The closed “reviewed” version of this how-to is located here: openSUSE software installation hints - openSUSE Forums

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 for openSUSE Linux already packaged software applications (packaged as rpms) are:

INSTALL SOFTWARE FROM ZYPPER

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 repository

For 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 webpin and get this hit: Webpin search results for bluefish and you note a stable version is in the Education repos (lets avoid unstable development versions):

http://download.opensuse.org/repositories/Education/openSUSE_11.2

So to install by zypper you simply type:

zypper ar http://download.opensuse.org/repositories/Education/openSUSE_11.2 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 bluefish

if you want to see what files came with bluefish after installing, type:

rpm -ql bluefish

INSTALL SOFTWARE FROM RPM COMMAND

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 that 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 dependant 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.

REBUILD OLD RPM

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.0 but not 11.1 nor 11.2. But you wish to use it for 11.2. Then if you can find the rpm " .src " file, you can easily rebuild the rpm in SOME (not all) cases.

Lets say you wish to use the application “camorama” under openSUSE-11.2. But you note packman packages packaged it for openSUSE-11.0 but not 11.2. You find it here: PackMan :: Package details for camorama for 11.0 and note the source file here: http://packman.links2linux.org/downloadsource/58563/camorama-0.19-0.pm.2.src.rpm

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

rpmbuild --rebuild camorama-0.19-0.pm.2.src.rpm

and sometimes that will create the rpm for 11.2. It may ask that you install some dependencies, so this could be an iterative process before you succeed. Then if you succeed in rebuilding the rpm for 11.2, 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.

ASK A PACKMAN PACKAGER

But lets say the application is NOT there at all, no rpm, nor rpm source file, and you desparately 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

COMPILE YOURSELF

But lets say no one will package this for you.

You could then compile it yourself, which dependant on the application may be difficult or easy. To do so, 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:

./configure
make
su
checkinstall

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

./configure
make
su
make install
checkinstall

and install the created rpm on top of the already installed applications.

KEEP REPOSITORIES LEAN AND MEAN

My recommendation is users stick with 4 and only 4 repositories. Those 4 are OSS, Non-OSS, Update and Packman. There is guidance here for setting up those 4 on openSUSE-11.2: Repositories/11.2 - openSUSE-Community The chances are OSS, Non-OSS, and Update are already setup, and you just need to add packman. Again ONLY those 4. If you add others you could have dependency problems. I recommend you add others ONLY as needed and IMMEDIATELY disable or remove them after you install what you need.

Again, software can be managed under openSUSE with Zypper: Zypper/Usage/11.2 - openSUSE

or by going to YaST > Software > Software Management.

This post originated out of a discussion on this thread: Question about software installation - openSUSE Forums

If believed useful, we can move this post to the reviewed area, or possibly stickie it in our New Users top level section.

Thanks for preparing this. A lot of people ask for this info.

Do you think it might be a little improved by clarifying Compile from Source. Users might see this as referring to .rpm’s

And you don’t address manual .rpm install Eg;
rpm -ihv <packagename>
rpm -Uhv <packagename>
Where and when this might be used, Eg; PUEL Virtual Box

Good idea!

[quote="“oldcpu,post:4,topic:38947”]

Good idea![/QUOTE]Done! I did not want to put too much detail, as one could write a chapter in a book on this.

Yes, this would also be useful. …

[quote="“oldcpu,post:6,topic:38947”]

Yes, this would also be useful. …[/QUOTE]
OK, done.

But one thing, this could go on and on and on. The original idea (as scoped in the title) was “software installation hints”. Note the "hints’. This was not intended to be an all inclusive guide, and I sense if I put too much in these “hints” then there will be a tendancy to push this to be an all inclusive guide, and that never was my intent from the start.

I agree, it’s something you could write a ‘Bible’ on, indeed some people have. Looks better though.

Google is good but then in the konsole:

man rpm

Just read the ‘closed’ one. I like it. Thanks for all the work. I think This, or very similar, should go into the new Wiki also.

Excellent, thank you. Didn’t know about the possibility of rebuilding older source packages. This will come in handy.

One possibility you may want to add about installing rpms downloaded from webpin, which may appeal to new users: I use to put these rpms in a directory that I add as a source in Yast repository manager. So the user that’s not yet comfortable with the command line can install them via Yast software manager.

Hi, thank you for a very helpful guide :smiley:

So, the other day when I opened mkvmerge, it prompted a new available update from their website. I went to the link and downloaded rpm for the latest package. I installed it with

rpm -Uhv packagename.rpm

It failed because of dependencies issue.

Then, I click the rpm and it open GUI installer that automatically resolve dependency problem and installed it fine.

My question is, what happen behind the scene? It ran zypper? How can I do it from cli?

Please start a new thread. The info in this one is already 4 years old.

To install it with zypper from a downloaded rpm


zypper install packagename.rpm

if you are in the directory where the package is, otherwise you can just
give the full path to the package to zypper. It will resolve the
dependencies (as long as the dependencies can be resolved from your
configured repositories).


PC: oS 13.1 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.11 | GTX 650 Ti
ThinkPad E320: oS 13.1 x86_64 | i3@2.30GHz | 8GB | KDE 4.11 | HD 3000
HTPC: oS 13.1 x86_64 | Celeron@1.8GHz | 2GB | Gnome 3.10 | HD 2500

Hi,

I comment on this thread because the locked one direct here for discussion.

Hi Martin, thanks.

Zypper is awesome! The guide mention this, but not giving an example for handling rpm with zypper:

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 that 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.

Coming from apt-get distro which use dpkg for installing deb package directly. I thought it works the same way in openSUSE with zypper and rpm.

rpm itself f.e. does not communicate with the repos configured. Zypper otoh is aware of the repos and their content.
You can also use

zypper sh

to run zypper’s own shell. Once you’re running that you can leave the “zypper” part out of the commands:

zypper ref && zypper up

would become


# zypper sh
zypper>ref
zypper>up

A very nice one here is


# zypper sh
zypper>help

Very nice addition, new knowledge for me. Thanks.

Hello,

I am putting this here because I think it may be a good addition to the ‘hints’:

Have run nanoblogger for some time, it has always worked, but I have always wondered where exactly to install it.

In the past I just left it in the ~/Downloads directory or on the ~/Desktop but I think that it actually belongs in /usr/local/ or /usr/share/,
or maybe somewhere else. I have wondered this a number of times and in software which one compiles oneself there is often no info as
to where to install it… Something like; where you choose, or according to your distribution.

thanks,

a5’

On Fri 14 Nov 2014 05:56:13 PM CST, a59303 wrote:

Hello,

I am putting this here because I think it may be a good addition to the
-‘hints’-:

Have run ‘nanoblogger’ (http://nanoblogger.sourceforge.net/) for some
time, it has always worked, but I have always wondered where exactly to
install it.

In the past I just left it in the ~/Downloads directory or on the
~/Desktop but I think that it actually belongs in /usr/local/ or
/usr/share/,
or maybe somewhere else. I have wondered this a number of times and in
software which one compiles oneself there is often no info as
to where to install it… -Something like-; where you choose, or
according to your distribution.

thanks,

a5’

Hi
Generally the package readme will tell you these things, it may be a
binary and have for example a configure program which you can run
–help with.

In your example I have packaged it up :wink:
https://build.opensuse.org/package/show/home:malcolmlewis:TESTING/nanoblogger

Spec file;
https://build.opensuse.org/package/view_file/home:malcolmlewis:TESTING/nanoblogger/nanoblogger.spec?expand=1

Since this is just some bash tools, it needs a manual install in the
spec file, and a wrapper script to start in the correct sub directory
in this case /usr/share/nanoblogger

Conf files go in /etc and in rpm we set to not replace (for all the
changes you do and it updates, we don’t want to over write!)

The wrapper script since it’s meant to be run by any user goes
into /usr/bin, if it was root, the /usr/sbin.
https://build.opensuse.org/package/view_file/home:malcolmlewis:TESTING/nanoblogger/nb.wrapper?expand=1


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.28-4-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Wow, thanks for all the details, I will certainly investigate that…
and for packaging it.

thanks,

a5’