Skip to content

Instantly share code, notes, and snippets.

@fprimex
Created February 15, 2014 02:13
Show Gist options
  • Save fprimex/9013571 to your computer and use it in GitHub Desktop.
Save fprimex/9013571 to your computer and use it in GitHub Desktop.
Non-root package installs under opensuse
mkdir -p ~/local/var/lib
mkdir ~/local/etc
cd ~/local/etc
cp -R /etc/zypp .
cd ~/local/var/lib
cp -R /var/lib/rpm .
cd
cat >> ~/.bashrc << 'EOF'
export PATH="$HOME"/local/usr/bin:"$PATH"
export LD_LIBRARY_PATH="$HOME"/local/usr/lib64:"$LD_LIBRARY_PATH"
EOF
. ~/.bashrc
# repeat these two commands until all packages
# are downloaded and installed. it took me two times.
# (this will fail, choose 'a' to abort)
zypper --root ~/local install pidgin
find ~/local/var/cache/zypp/packages -name '*.rpm' -exec rpm --dbpath ~/local/var/lib/rpm --badreloc --relocate /="$HOME"/local/ -ivh {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment