Results 1 to 1 of 1

Thread: openSUSE software installation hints

  1. #1
    Join Date
    Mar 2008
    Location
    Phuket, Thailand
    Posts
    26,565
    Blog Entries
    38

    Default openSUSE software installation hints

    openSUSE software installation hints


    Comments on this how to can be made on this thread 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 are:
    • Packman packages [Note this search engine will search for packages packaged by the Packman packagers]
    • Software.openSUSE.org [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].


    INSTALL SOFTWARE WITH ZYPPER COMMAND

    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:
    Code:
    zypper ar   #add repository
    zypper install  #install the application
    zypper rr  #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 "opensuse search.org) and get this hit: openSUSE-11.4 search results for bluefish and you note a stable version is in the Education repos (lets avoid unstable development versions):
    Code:
    http://download.opensuse.org/repositories/Education/openSUSE_11.4
    So to install by zypper you simply type:
    Code:
    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:
    Code:
    rpm -qi bluefish
    If you want to see what files came with bluefish after installing, type:
    Code:
    rpm -ql bluefish
    If you want a list of all files that you have installed, in chronological order, type:
    Code:
    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. :
    Code:
    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.

    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 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:
    Code:
    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:
    Code:
    rpm -Uvh application.rpm
    Do a search on google for "rpm" to learn more about the command.


    REBUILD an 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.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:
    Code:
    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 (for 11.2) and you note the rpm source/spec file for tea here: http://packman.links2linux.de/downlo...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:
    Code:
    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:
    Code:
    su -c 'zypper in aspell-devel libqt4-devel'
    and after that is successful, again as a REGULAR user try with:
    Code:
    rpmbuild --rebuild tea-29.0.2-1.pm.1.2.src.rpm

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

    ASK A PACKMAN PACKAGER

    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


    COMPILE YOURSELF

    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:
    Code:
    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:
    Code:
    ./configure
    make
    su
    checkinstall
    and install the created rpm, or if that does not work:
    Code:
    ./configure
    make
    su
    make install
    checkinstall
    and install the created rpm on top of the already installed applications.

    KEEP YOUR REPOSITORIES LEAN AND MEAN

    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

    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:
    Code:
    zypper lr -d
    This post originated out of a discussion on this thread: Question about software installation - openSUSE Forums

    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

    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.
    Last edited by oldcpu; 14-Mar-2019 at 02:45. Reason: Revision-7 for openSUSE-12.2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •