Unpacking RPM packages

From ScientificComputing
Revision as of 09:42, 6 April 2018 by Sfux (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In some cases, software is only available as RPM package and can not directly be compiled from source. You can not install such software the usual way (yum, rpm) because of lack of privileges. It so however possible to install RPM packages in user space if they do not contain scripts that need to be executed as root user.

How To Install an RPM Package as a User

Keep in mind that Euler and Leonhard currently use CentOS 7.4 and that the RPM needs to be compatible with the clusters operating system.

To install it, you will have to manually unpack it.

  1. Obtain the package
  2. Go to your home directory:
    cd
  3. Unpack the package:
    rpm2cpio myrpmfile.rpm | cpio -idmv
  4. (Only once) Add ~/usr/bin to your PATH environment variable and add ~/usr/lib64 to your LD_LIBRARY_PATH environment variable. One way to do this is to add the following two lines to your ~/.bashrc file:
    PATH=$PATH:~/usr/bin
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/usr/lib64

Note that everything must be done manually including possibly installing all dependencies.