Home >> Linux >> How to install .src.rpm packages in openSuse

How to install .src.rpm packages in openSuse

This tutorial will cover the basics on how to install a .src.rpm package in OpenSuse. This applies to any suseSuSE version, and actually also to other distros (except step 5) as well.

  • you need to install the rpmbuild command itself, it complains about dependencies
  • As a root, type:
    # rpmbuild –rebuild package_name.src.rpm
    This is the simplest form, you can do a man rpmbuild to check more options
  • This will create a RPM, normally located in /usr/src/packages/………
    For example it could be /usr/src/packages/RPMS/i586/ package_name.rpm
  • Now install normally: cd into the dir where the rpm is and type
    # rpm -Uvih your_rpm_package.rpm
  • then run SuSEconfig

This step ain’t strictly necessary but wont hurt either. On the other hand it is always run by Yast too every time you install or uninstall something.

  • Your installed rpm package will appear normally in Yast, you can uninstall from there if you want to
  • You can reuse the rpm that has been created in this way, so you might want to save it in case for instance you need to reformat, etc etc

One comment

  1. Activate source-repository in config file and do it :
    # zypper source-install package_name

Leave a Reply

Your email address will not be published. Required fields are marked *