Difference between revisions of "Offline installation of packages"

From ArchWiki
Jump to: navigation, search
m
Line 5: Line 5:
  
  
Download ftp://ftp.archlinux.org/core/os/i686/core.db.tar.gz and ftp://ftp.archlinux.org/extra/os/i686/extra.db.tar.gz when you got an internet connection available. This  and the following steps will make sure you're working with up-to-date package lists, as if you ran <code>pacman -Sy</code>.
+
Download the following when you got an internet connection available, and transfer the files to home PC
 +
* ftp://ftp.archlinux.org/core/os/i686/core.db.tar.gz
 +
* ftp://ftp.archlinux.org/extra/os/i686/extra.db.tar.gz  
 +
* ftp://ftp.archlinux.org/community/os/i686/community.db.tar.gz
  
On your PC at home, do the following as root:
+
 
cd /var/lib/pacman
+
Following steps will make sure you're working with up-to-date package lists, as if you ran <code>pacman -Sy</code>.
cd core
+
 
rm -rf *
+
On home PC , do the following as root:
tar -xzf /path/to/downloaded/core.db.tar.gz
+
<pre>
cd ../extra
+
cd /var/lib/pacman/
rm -rf *
+
mkdir -p sync/core
tar -xzf /path/to/downloaded/extra.db.tar.gz
+
tar -xzf {path-to-download}/core.db.tar.gz
cd ~
+
 
  pacman -Sp --noconfim kde > pkglist
+
cd ../..
 +
mkdir -p sync/extra
 +
tar -xzf {path-to-download}/extra.db.tar.gz
 +
 
 +
cd ../..
 +
mkdir -p sync/community
 +
tar -xzf {path-to-download}/community.db.tar.gz
 +
</pre>
 +
  pacman -Sp --noconfim {package-name} > pkglist
  
 
Now open that textfile with an editor and delete all lines that are not URLs.
 
Now open that textfile with an editor and delete all lines that are not URLs.
 
Next, bring that list with you to a place where you have internet and either download the listed packages manually or do
 
Next, bring that list with you to a place where you have internet and either download the listed packages manually or do
 +
 
  wget -nv -i ../pkglist
 
  wget -nv -i ../pkglist
 +
 
in an empty directory. Take all the *.pkg.tar.gz files back home, put them in /var/cache/pacman/pkg and finally run
 
in an empty directory. Take all the *.pkg.tar.gz files back home, put them in /var/cache/pacman/pkg and finally run
  pacman -S kde
+
 
 +
  pacman -S {package-name}

Revision as of 10:54, 13 March 2008


A short howto on installing packages while offline. It is based on byte's post from this thread and uses KDE as an example.


Download the following when you got an internet connection available, and transfer the files to home PC


Following steps will make sure you're working with up-to-date package lists, as if you ran pacman -Sy.

On home PC , do the following as root:

cd /var/lib/pacman/
mkdir -p sync/core
tar -xzf {path-to-download}/core.db.tar.gz

cd ../..
mkdir -p sync/extra
tar -xzf {path-to-download}/extra.db.tar.gz

cd ../..
mkdir -p sync/community
tar -xzf {path-to-download}/community.db.tar.gz
pacman -Sp --noconfim {package-name} > pkglist

Now open that textfile with an editor and delete all lines that are not URLs. Next, bring that list with you to a place where you have internet and either download the listed packages manually or do

wget -nv -i ../pkglist

in an empty directory. Take all the *.pkg.tar.gz files back home, put them in /var/cache/pacman/pkg and finally run

pacman -S {package-name}