How to Install Arch Package OFFLINE?

This tutorial is for Arch Linux user who doesn't have any internet connection.
First, download the current database on a Internet connected computer from this server :


For i686:
For x86_64:
Or do this step to keep up-to-date your Arch Linux with the current database collection.(Internet Connection required)
Type this command in your terminal:
pacman -Sy

Then, do this in your non-Internet Connected Arch Linux computer in root mode, type:

mkdir-p /var/lib/pacman/sync/{core,extra,community}
rm -r /var/lib/pacman/sync/{core,extra,community}/*
tar -xzf core.db.tar.gz      -C /var/lib/pacman/sync/core
tar -xzf extra.db.tar.gz     -C /var/lib/pacman/sync/extra
tar -xzf community.db.tar.gz -C /var/lib/pacman/sync/community
tar -xzf multilib.db.tar.gz  -C /var/lib/pacman/sync/multilib
rm -r /var/lib/pacman/sync/*.db
cp core.db /var/lib/pacman/sync/
cp extra.db /var/lib/pacman/sync/
cp community /var/lib/pacman/sync/
 
then add the package into the package list,type:
pacman -Sp --noconfirm package-name > pkglist 

Tip: Be aware you have enabled at least one of the 
servers defined in the /etc/pacman.d/mirrorlist file. Otherwise all what you get is a misleading error message: 
error: no database for package: package-name


to update the New Arch Linux base system after installation,type:
pacman -Sup --noconfirm > 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
 
----
The simplest way to install an already downloaded Arch package is:
Pacman -U /path/to/file  

Example: pacman -U /home/hxr99/bash.pkg.tar.xz

That's all folks, I hope this tutorial will help you.
It's just for educational purpose only.
The author is not responsible for any misuse or damage caused by this tutorial.
Thank you for visiting my blog.

 

3 comments:

  1. Wow!
    pacman -Sup --noconfirm > pkglist

    with this i can use a PC with internet with high fast velec to upgrade my PC!!

    very thanks!

    ReplyDelete
  2. Thank you for the info. It sounds pretty user friendly. I guess I’ll pick one up for fun. thank u




    Nicobar Tour Package

    ReplyDelete
  3. ftp://ftp.archlinux.org/multilib/os/i686/multilib.db.tar.gz

    i cant download it ?

    "This webpage is not available" ?

    ReplyDelete