You are not logged in.

#1 2017-08-29 14:28:46

Michael Gruenstaeudl
Member
Registered: 2014-12-03
Posts: 51

[Solved] Offline system install - Installing pkgs with dependencies

I successfully installed the Arch Linux groups base and base-devel on an offline system by following the recommendation of this post. However, any further installation of packages on the offline system proves impossible, as pacman cannot install any downloaded package that has dependencies.

Following the recommendations here, I first defined the desired package on the offline system:

 pacman -Sp --noconfirm package-name > pkglist 

Second, I downloaded the desired packages on an online system:

 wget -nv -i pkglist 

Third, I disable all mirrors in /etc/pacman.d/mirrorlist

Fourth, I attempt to install the package on the offline system via:

 pacman -U /path_to_pkgs/package-name.pkg.tar.xz --noconfirm 

This procedure works well, except for those package that have dependencies themselves (e.g., xorg-server-common):

loading packages...
resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: harfbuzz will be installed before its freetype2 dependency

Packages (15) fontconfig-2.12.4-1  freetype2-2.8-2  graphite-1:1.3.10-1  harfbuzz-1.5.0-1  libx11-1.6.5-1  libxfont-1.5.2-1  libxkbfile-1.0.9-1  xorg-bdftopcf-1.0.5-1  xorg-font-utils-7.6-4  xorg-fonts-misc-1.0.3-5  xorg-mkfontdir-1.0.7-8  xorg-mkfontscale-1.1.2-1  xorg-setxkbmap-1.3.1-1  xorg-xkbcomp-1.4.0-1  xorg-server-common-1.19.3-3

Total Download Size:   12.64 MiB
Total Installed Size:  35.25 MiB

:: Proceed with installation? [Y/n] 
error: no servers configured for repository: extra
error: failed to commit transaction (no servers configured for repository)
Errors occurred, no packages were upgraded.

How can I correctly install the desired packages?
(Note: Maybe the error is the result of me disabling all mirrors in /etc/pacman.d/mirrorlist.)

Last edited by Michael Gruenstaeudl (2017-08-30 09:48:21)

Offline

#2 2017-08-29 14:52:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,448
Website

Re: [Solved] Offline system install - Installing pkgs with dependencies

As long as you have actually moved all the dependency packages, you should be able to install them - just not with pacman -U.

One way you could use pacman -U would be if you just listed all those packages on the command line at the same time, but this would have a notable downside of installing them all as explicitly installed packages.

Alternatives include moving the package files to your package cache, then just using pacman normally, or alternatively using a --cachedir flag for pacman.  Either of these will allow pacman to find the dependencies in the local cache, so it will not try to download anything.

Yet another approach that would be simple while still maintaining a proper package database would be to install *all* the packages 'asdeps' then change the install reason to explicit just for the ones you wanted.  E.g.:

pacman -U --asdeps /path/to/downloaded/pkgs/*.tar.xz
pacan -D --asexplicit leaf1 leaf2

where leaf1 and leaf2 are the top level packages that you intended to install (those that were passed to -Sp on the networked system).

All that said, an offline archlinux system is simply not a good idea - why are you using arch for that system?  There are distros much better suited to offline use.

Last edited by Trilby (2017-08-29 14:56:08)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#3 2017-08-29 15:13:42

Michael Gruenstaeudl
Member
Registered: 2014-12-03
Posts: 51

Re: [Solved] Offline system install - Installing pkgs with dependencies

@Trilby
Moving the package files to my package cache and then executing pacman normally (or by using a --cachedir flag) does not resolve the issue.

pacman -S xorg-server-common --cachedir /var/cache/pacman/pkg --noconfirm

resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: harfbuzz will be installed before its freetype2 dependency

Packages (15) fontconfig-2.12.4-1  freetype2-2.8-2  graphite-1:1.3.10-1  harfbuzz-1.5.0-1  libx11-1.6.5-1  libxfont-1.5.2-1  libxkbfile-1.0.9-1  xorg-bdftopcf-1.0.5-1  xorg-font-utils-7.6-4  xorg-fonts-misc-1.0.3-5  xorg-mkfontdir-1.0.7-8  xorg-mkfontscale-1.1.2-1  xorg-setxkbmap-1.3.1-1  xorg-xkbcomp-1.4.0-1  xorg-server-common-1.19.3-3

Total Download Size:    0.22 MiB
Total Installed Size:  35.25 MiB

:: Proceed with installation? [Y/n] 
error: no servers configured for repository: extra
error: failed to commit transaction (no servers configured for repository)
Errors occurred, no packages were upgraded.

Here are the contents of /var/cache/pacman/pkg/:

ls /var/cache/pacman/pkg/

adwaita-icon-theme-3.24.0-1-any.pkg.tar.xz
archlinux-keyring-20170823-1-any.pkg.tar.xz
atk-2.24.0-2-x86_64.pkg.tar.xz
autoconf-2.69-4-any.pkg.tar.xz
automake-1.15.1-1-any.pkg.tar.xz
bash-4.4.012-2-x86_64.pkg.tar.xz
binutils-2.28.0-4-x86_64.pkg.tar.xz
bison-3.0.4-3-x86_64.pkg.tar.xz
bluez-libs-5.46-1-x86_64.pkg.tar.xz
bzip2-1.0.6-6-x86_64.pkg.tar.xz
cairo-1.14.10-1-x86_64.pkg.tar.xz
compositeproto-0.4.2-3-any.pkg.tar.xz
coreutils-8.27-1-x86_64.pkg.tar.xz
cryptsetup-1.7.5-1-x86_64.pkg.tar.xz
curl-7.55.1-2-x86_64.pkg.tar.xz
damageproto-1.2.1-3-any.pkg.tar.xz
dbus-1.10.22-1-x86_64.pkg.tar.xz
dbus-glib-0.108-1-x86_64.pkg.tar.xz
dconf-0.26.0+1+g701d19d-1-x86_64.pkg.tar.xz
desktop-file-utils-0.23-1-x86_64.pkg.tar.xz
device-mapper-2.02.173-1-x86_64.pkg.tar.xz
dhcpcd-6.11.5-1-x86_64.pkg.tar.xz
diffutils-3.6-1-x86_64.pkg.tar.xz
dmxproto-2.3.1-3-any.pkg.tar.xz
dri2proto-2.8-2-any.pkg.tar.xz
dri3proto-1.0-1-any.pkg.tar.xz
e2fsprogs-1.43.5-1-x86_64.pkg.tar.xz
fakeroot-1.21-2-x86_64.pkg.tar.xz
file-5.31-1-x86_64.pkg.tar.xz
filesystem-2017.03-2-x86_64.pkg.tar.xz
findutils-4.6.0-2-x86_64.pkg.tar.xz
fixesproto-5.0+9+g4292ec1-1-any.pkg.tar.xz
flex-2.6.4-1-x86_64.pkg.tar.xz
fontconfig-2.12.4-1-x86_64.pkg.tar.xz
fontsproto-2.1.3-2-any.pkg.tar.xz
freetype2-2.8-2-x86_64.pkg.tar.xz
gawk-4.1.4-2-x86_64.pkg.tar.xz
gcc-7.1.1-4-x86_64.pkg.tar.xz
gcc-libs-7.1.1-4-x86_64.pkg.tar.xz
gcr-3.20.0+45+g4708f35-1-x86_64.pkg.tar.xz
gettext-0.19.8.1-2-x86_64.pkg.tar.xz
glibc-2.25-7-x86_64.pkg.tar.xz
glib-networking-2.50.0-2-x86_64.pkg.tar.xz
glproto-1.4.17-1-any.pkg.tar.xz
glproto-1.4.17-1-any.pkg.tar.xz.1
gpgme-1.9.0-3-x86_64.pkg.tar.xz
grep-3.1-1-x86_64.pkg.tar.xz
groff-1.22.3-7-x86_64.pkg.tar.xz
gsettings-desktop-schemas-3.24.0-1-any.pkg.tar.xz
gtk-update-icon-cache-3.22.19-2-x86_64.pkg.tar.xz
gzip-1.8-2-x86_64.pkg.tar.xz
harfbuzz-1.5.0-1-x86_64.pkg.tar.xz
inetutils-1.9.4-5-x86_64.pkg.tar.xz
inputproto-2.3.2-1-any.pkg.tar.xz
iproute2-4.12.0-2-x86_64.pkg.tar.xz
iputils-20161105.1f2bb12-2-x86_64.pkg.tar.xz
iso-codes-3.75-1-any.pkg.tar.xz
jansson-2.10-2-x86_64.pkg.tar.xz
jasper-2.0.13-2-x86_64.pkg.tar.xz
jfsutils-1.1.15-4-x86_64.pkg.tar.xz
js-24.2.0-4-x86_64.pkg.tar.xz
json-glib-1.2.8-1-x86_64.pkg.tar.xz
kbproto-1.0.7-1-any.pkg.tar.xz
less-487-1-x86_64.pkg.tar.xz
libarchive-3.3.2-1-x86_64.pkg.tar.xz
libcroco-0.6.12+4+g9ad7287-1-x86_64.pkg.tar.xz
libdaemon-0.14-3-x86_64.pkg.tar.xz
libdatrie-0.2.10-2-x86_64.pkg.tar.xz
libdmx-1.1.3-1-x86_64.pkg.tar.xz
libdrm-2.4.83-1-x86_64.pkg.tar.xz
libepoxy-1.4.3-1-x86_64.pkg.tar.xz
libevdev-1.5.7-1-x86_64.pkg.tar.xz
libfontenc-1.1.3-1-x86_64.pkg.tar.xz
libglvnd-0.2.999+g4ba53457-2-x86_64.pkg.tar.xz
libgudev-231+1+g0841288-1-x86_64.pkg.tar.xz
libice-1.0.9-1-x86_64.pkg.tar.xz
libinput-1.8.1-1-x86_64.pkg.tar.xz
libmm-glib-1.6.8-1-x86_64.pkg.tar.xz
libndp-1.6-1-x86_64.pkg.tar.xz
libnewt-0.52.20-1-x86_64.pkg.tar.xz
libnm-1.8.3dev+18+gf43222d41-1-x86_64.pkg.tar.xz
libnm-glib-1.8.3dev+18+gf43222d41-1-x86_64.pkg.tar.xz
libnotify-0.7.7-1-x86_64.pkg.tar.xz
libomxil-bellagio-0.9.3-1-x86_64.pkg.tar.xz
libpciaccess-0.13.5-1-x86_64.pkg.tar.xz
libpgm-5.2.122-2-x86_64.pkg.tar.xz
libpng-1.6.31-1-x86_64.pkg.tar.xz
libsecret-0.18.5+14+g9980655-1-x86_64.pkg.tar.xz
libsm-1.2.2-2-x86_64.pkg.tar.xz
libsodium-1.0.13-1-x86_64.pkg.tar.xz
libsoup-2.58.2-1-x86_64.pkg.tar.xz
libsystemd-234.11-8-x86_64.pkg.tar.xz
libteam-1.26-1-x86_64.pkg.tar.xz
libthai-0.1.26-1-x86_64.pkg.tar.xz
libtiff-4.0.8-2-x86_64.pkg.tar.xz
libtool-2.4.6-8-x86_64.pkg.tar.xz
libtxc_dxtn-1.0.1-6-x86_64.pkg.tar.xz
libunwind-1.2.1-1-x86_64.pkg.tar.xz
libwacom-0.24-1-x86_64.pkg.tar.xz
libx11-1.6.5-1-x86_64.pkg.tar.xz
libxau-1.0.8-2-x86_64.pkg.tar.xz
libxaw-1.0.13-1-x86_64.pkg.tar.xz
libxcb-1.12-1-x86_64.pkg.tar.xz
libxcomposite-0.4.4-2-x86_64.pkg.tar.xz
libxcursor-1.1.14-2-x86_64.pkg.tar.xz
libxdamage-1.1.4-2-x86_64.pkg.tar.xz
libxdmcp-1.1.2-1-x86_64.pkg.tar.xz
libxext-1.3.3-1-x86_64.pkg.tar.xz
libxfixes-5.0.3-1-x86_64.pkg.tar.xz
libxfont-1.5.2-1-x86_64.pkg.tar.xz
libxfont2-2.0.1-1-x86_64.pkg.tar.xz
libxft-2.3.2-1-x86_64.pkg.tar.xz
libxi-1.7.9-1-x86_64.pkg.tar.xz
libxinerama-1.1.3-2-x86_64.pkg.tar.xz
libxkbcommon-0.7.2-1-x86_64.pkg.tar.xz
libxkbfile-1.0.9-1-x86_64.pkg.tar.xz
libxmu-1.1.2-1-x86_64.pkg.tar.xz
libxpm-3.5.12-1-x86_64.pkg.tar.xz
libxrandr-1.5.1-1-x86_64.pkg.tar.xz
libxrender-0.9.10-1-x86_64.pkg.tar.xz
libxshmfence-1.2-1-x86_64.pkg.tar.xz
libxt-1.1.5-1-x86_64.pkg.tar.xz
libxtst-1.2.3-1-x86_64.pkg.tar.xz
libxv-1.0.11-1-x86_64.pkg.tar.xz
libxxf86dga-1.1.4-1-x86_64.pkg.tar.xz
libxxf86vm-1.1.4-1-x86_64.pkg.tar.xz
licenses-20140629-2-any.pkg.tar.xz
linux-4.12.8-2-x86_64.pkg.tar.xz
llvm-libs-4.0.1-5-x86_64.pkg.tar.xz
lm_sensors-3.4.0-2-x86_64.pkg.tar.xz
logrotate-3.12.3-1-x86_64.pkg.tar.xz
lvm2-2.02.173-1-x86_64.pkg.tar.xz
m4-1.4.18-1-x86_64.pkg.tar.xz
make-4.2.1-2-x86_64.pkg.tar.xz
man-db-2.7.6.1-2-x86_64.pkg.tar.xz
man-pages-4.12-1-any.pkg.tar.xz
mdadm-4.0-1-x86_64.pkg.tar.xz
mesa-17.1.7-2-x86_64.pkg.tar.xz
mobile-broadband-provider-info-20170310-1-any.pkg.tar.xz
mtdev-1.1.5-1-x86_64.pkg.tar.xz
nano-2.8.6-1-x86_64.pkg.tar.xz
netctl-1.13-2-any.pkg.tar.xz
networkmanager-1.8.3dev+18+gf43222d41-1-x86_64.pkg.tar.xz
network-manager-applet-1.8.2-1-x86_64.pkg.tar.xz
nm-connection-editor-1.8.2-1-x86_64.pkg.tar.xz
pacman-5.0.2-2-x86_64.pkg.tar.xz
pacman-mirrorlist-20170729-1-any.pkg.tar.xz
pango-1.40.11-1-x86_64.pkg.tar.xz
patch-2.7.5-1-x86_64.pkg.tar.xz
pciutils-3.5.4-1-x86_64.pkg.tar.xz
pcmciautils-018-7-x86_64.pkg.tar.xz
perl-5.26.0-3-x86_64.pkg.tar.xz
pixman-0.34.0-1-x86_64.pkg.tar.xz
pkg-config-0.29.2-1-x86_64.pkg.tar.xz
polkit-0.113+29+g3272a98-1-x86_64.pkg.tar.xz
presentproto-1.1-1-any.pkg.tar.xz
presentproto-1.1-1-any.pkg.tar.xz.1
procps-ng-3.3.12-1-x86_64.pkg.tar.xz
psmisc-23.1-1-x86_64.pkg.tar.xz
randrproto-1.5.0-1-any.pkg.tar.xz
recordproto-1.14.2-2-any.pkg.tar.xz
reiserfsprogs-3.6.25-1-x86_64.pkg.tar.xz
renderproto-0.11.1-3-any.pkg.tar.xz
resourceproto-1.2.0-3-any.pkg.tar.xz
resourceproto-1.2.0-3-any.pkg.tar.xz.1
scrnsaverproto-1.2.2-2-any.pkg.tar.xz
sed-4.4-1-x86_64.pkg.tar.xz
shadow-4.5-2-x86_64.pkg.tar.xz
shared-mime-info-1.8-1-x86_64.pkg.tar.xz
s-nail-14.9.3-1-x86_64.pkg.tar.xz
sudo-1.8.20.p2-1-x86_64.pkg.tar.xz
sysfsutils-2.1.0-9-x86_64.pkg.tar.xz
systemd-sysvcompat-234.11-8-x86_64.pkg.tar.xz
tar-1.29-2-x86_64.pkg.tar.xz
texinfo-6.4-1-x86_64.pkg.tar.xz
usbutils-008-1-x86_64.pkg.tar.xz
util-linux-2.30.1-2-x86_64.pkg.tar.xz
videoproto-2.3.3-1-any.pkg.tar.xz
wayland-1.14.0-1-x86_64.pkg.tar.xz
wayland-protocols-1.10-1-any.pkg.tar.xz
which-2.21-2-x86_64.pkg.tar.xz
xcb-proto-1.12-3-any.pkg.tar.xz
xcb-util-0.4.0-1-x86_64.pkg.tar.xz
xcb-util-image-0.4.0-1-x86_64.pkg.tar.xz
xcb-util-keysyms-0.4.0-1-x86_64.pkg.tar.xz
xcb-util-renderutil-0.3.9-1-x86_64.pkg.tar.xz
xcb-util-wm-0.4.1-1-x86_64.pkg.tar.xz
xextproto-7.3.0-1-any.pkg.tar.xz
xf86driproto-2.1.1-3-any.pkg.tar.xz
xf86-input-libinput-0.25.1-1-x86_64.pkg.tar.xz
xf86-video-vesa-2.3.4-4-x86_64.pkg.tar.xz
xfsprogs-4.12.0-1-x86_64.pkg.tar.xz
xineramaproto-1.2.1-3-any.pkg.tar.xz
xkeyboard-config-2.21-2-any.pkg.tar.xz
xorg-bdftopcf-1.0.5-1-x86_64.pkg.tar.xz
xorg-docs-1.7.1-1-any.pkg.tar.xz
xorg-fonts-100dpi-1.0.3-3-any.pkg.tar.xz
xorg-fonts-75dpi-1.0.3-3-any.pkg.tar.xz
xorg-fonts-alias-1.0.3-1-any.pkg.tar.xz
xorg-fonts-encodings-1.0.4-4-any.pkg.tar.xz
xorg-fonts-misc-1.0.3-5-any.pkg.tar.xz
xorg-font-util-1.3.1-1-x86_64.pkg.tar.xz
xorg-font-utils-7.6-4-any.pkg.tar.xz
xorg-iceauth-1.0.7-1-x86_64.pkg.tar.xz
xorg-luit-1.1.1-2-x86_64.pkg.tar.xz
xorg-mkfontdir-1.0.7-8-any.pkg.tar.xz
xorg-mkfontscale-1.1.2-1-x86_64.pkg.tar.xz
xorg-server-1.19.3-3-x86_64.pkg.tar.xz
xorg-server-common-1.19.3-3-x86_64.pkg.tar.xz
xorg-server-devel-1.19.3-3-x86_64.pkg.tar.xz
xorg-server-xdmx-1.19.3-3-x86_64.pkg.tar.xz
xorg-server-xephyr-1.19.3-3-x86_64.pkg.tar.xz
xorg-server-xnest-1.19.3-3-x86_64.pkg.tar.xz
xorg-server-xvfb-1.19.3-3-x86_64.pkg.tar.xz
xorg-server-xwayland-1.19.3-3-x86_64.pkg.tar.xz
xorg-sessreg-1.1.1-1-x86_64.pkg.tar.xz
xorg-setxkbmap-1.3.1-1-x86_64.pkg.tar.xz
xorg-smproxy-1.0.6-1-x86_64.pkg.tar.xz
xorg-util-macros-1.19.1-1-any.pkg.tar.xz
xorg-util-macros-1.19.1-1-any.pkg.tar.xz.1
xorg-x11perf-1.6.0-1-x86_64.pkg.tar.xz
xorg-xauth-1.0.10-1-x86_64.pkg.tar.xz
xorg-xbacklight-1.2.1-1-x86_64.pkg.tar.xz
xorg-xcmsdb-1.0.5-1-x86_64.pkg.tar.xz
xorg-xcursorgen-1.0.6-1-x86_64.pkg.tar.xz
xorg-xdpyinfo-1.3.2-1-x86_64.pkg.tar.xz
xorg-xdriinfo-1.0.5-2-x86_64.pkg.tar.xz
xorg-xev-1.2.2-1-x86_64.pkg.tar.xz
xorg-xgamma-1.0.6-1-x86_64.pkg.tar.xz
xorg-xhost-1.0.7-1-x86_64.pkg.tar.xz
xorg-xinit-1.3.4-4-x86_64.pkg.tar.xz
xorg-xinput-1.6.2-1-x86_64.pkg.tar.xz
xorg-xkbcomp-1.4.0-1-x86_64.pkg.tar.xz
xorg-xkbevd-1.1.4-1-x86_64.pkg.tar.xz
xorg-xkbutils-1.0.4-2-x86_64.pkg.tar.xz
xorg-xkill-1.0.4-1-x86_64.pkg.tar.xz
xorg-xlsatoms-1.1.2-1-x86_64.pkg.tar.xz
xorg-xlsclients-1.1.3-1-x86_64.pkg.tar.xz
xorg-xmodmap-1.0.9-1-x86_64.pkg.tar.xz
xorg-xpr-1.0.4-2-x86_64.pkg.tar.xz
xorg-xprop-1.2.2-1-x86_64.pkg.tar.xz
xorg-xrandr-1.5.0-1-x86_64.pkg.tar.xz
xorg-xrdb-1.1.0-2-x86_64.pkg.tar.xz
xorg-xrefresh-1.0.5-1-x86_64.pkg.tar.xz
xorg-xset-1.2.3-1-x86_64.pkg.tar.xz
xorg-xsetroot-1.1.1-2-x86_64.pkg.tar.xz
xorg-xvinfo-1.1.3-1-x86_64.pkg.tar.xz
xorg-xwd-1.0.6-1-x86_64.pkg.tar.xz
xorg-xwininfo-1.1.3-1-x86_64.pkg.tar.xz
xorg-xwud-1.0.4-2-x86_64.pkg.tar.xz
xproto-7.0.31-1-any.pkg.tar.xz
zeromq-4.2.2-1-x86_64.pkg.tar.xz

Offline

#4 2017-08-29 15:17:04

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: [Solved] Offline system install - Installing pkgs with dependencies

Set VerbosePkgLists in pacman.conf, it will tell you what's not already available and will need to be downloaded.

Online

#5 2017-08-29 15:21:15

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: [Solved] Offline system install - Installing pkgs with dependencies

Offline

#6 2017-08-29 15:31:42

Michael Gruenstaeudl
Member
Registered: 2014-12-03
Posts: 51

Re: [Solved] Offline system install - Installing pkgs with dependencies

I am pretty sure that I have downloaded all the necessary dependencies and copied them to/var/cache/pacman/pkg. What I am not sure about, however, is that the pacman databases are correctly (because manually) installed. Wouldn't the error messages point to that conclusion?

Note: None of the repositories core, extra, community or multilib in /etc/pacman.conf and none of the mirrors in /etc/pacman.d/mirrorlist are commented out for the example below.

pacman -S xorg-server-common --noconfirm

resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: harfbuzz will be installed before its freetype2 dependency

Package (15)              New Version  Net Change

extra/fontconfig          2.12.4-1       1.94 MiB
extra/freetype2           2.8-2          5.78 MiB
extra/graphite            1:1.3.10-1     0.77 MiB
extra/harfbuzz            1.5.0-1        2.41 MiB
extra/libx11              1.6.5-1       10.54 MiB
extra/libxfont            1.5.2-1        0.30 MiB
extra/libxkbfile          1.0.9-1        0.23 MiB
extra/xorg-bdftopcf       1.0.5-1        0.04 MiB
extra/xorg-font-utils     7.6-4          0.00 MiB
extra/xorg-fonts-misc     1.0.3-5       12.74 MiB
extra/xorg-mkfontdir      1.0.7-8        0.01 MiB
extra/xorg-mkfontscale    1.1.2-1        0.07 MiB
extra/xorg-setxkbmap      1.3.1-1        0.06 MiB
extra/xorg-xkbcomp        1.4.0-1        0.24 MiB
extra/xorg-server-common  1.19.3-3       0.12 MiB

Total Installed Size:  35.25 MiB

:: Proceed with installation? [Y/n] 
error: no servers configured for repository: extra
error: failed to commit transaction (no servers configured for repository)
Errors occurred, no packages were upgraded.

Last edited by Michael Gruenstaeudl (2017-08-29 15:35:55)

Offline

#7 2017-08-29 15:41:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: [Solved] Offline system install - Installing pkgs with dependencies

Well it makes somewhat sense, since in the view of pacman none of these packages exist in the database (the ones you installed with -U are likely to be considered local as well). As mentioned by Trilby, either pass all relevant packages to -U or as an alternative create your own repo, which should allow proper management: https://wiki.archlinux.org/index.php/Pa … repository

Offline

#8 2017-08-29 16:01:17

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: [Solved] Offline system install - Installing pkgs with dependencies

Michael Gruenstaeudl wrote:

I am pretty sure that I have downloaded all the necessary dependencies and copied them to/var/cache/pacman/pkg.

It does look like you do now, you didn't before:

Michael Gruenstaeudl wrote:

Total Download Size:    0.22 MiB

What happens when you uncomment a URL in the mirrorlist? It may just work

Online

#9 2017-08-29 19:39:13

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,448
Website

Re: [Solved] Offline system install - Installing pkgs with dependencies

I just checked your list of packages in your cache (first one you provided) against packages in the dependency tree (pactree) of xorg-server-common, you were missing a dozen packages.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#10 2017-08-30 09:47:18

Michael Gruenstaeudl
Member
Registered: 2014-12-03
Posts: 51

Re: [Solved] Offline system install - Installing pkgs with dependencies

I resolved the issue by

(a) Manually listing all dependencies of a desired package on the offline (!) system, followed by downloading each dependency on the online system and copying them to the pacman cache of the offline system:

List all dependencies of a desired package on the offline system

pacman -Si desired-package | awk -F'[:<=>]' '/^Depends/ {print $2}' | xargs -n1 | sort -u >> deplist

Download each dependency on the online system

for line in $(cat deplist): do pacman -Sp --noconfirm $line >> pkglist; done
wget -nv -i pkglist

Copy dependency packages to the pacman cache of the offline system

cp /mount_of_usb_drive/ *.pkg.tar.xz /var/cache/pacman/pkg/

followed by
(b) Adhering to Trilby's advice above in installing my entire pacman package cache of the offline system 'asdeps'

pacman -U --asdeps /var/cache/pacman/pkg/*.tar.xz

---

Note 1: One needs to be extra careful when generating and downloading the dependency lists, as the installation process is naturally unforgiving and will fail if only a single dependency package is missing.

Note 2: I believe that I experienced a case where dependencies of dependencies existed, which also needed to be downloaded. Thus, I had to repeat step (a) as described above on the dependency list deplist.

Last edited by Michael Gruenstaeudl (2017-08-30 09:49:14)

Offline

#11 2017-08-30 09:58:04

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Solved] Offline system install - Installing pkgs with dependencies

Michael Gruenstaeudl wrote:

List all dependencies of a desired package on the offline system

pacman -Si desired-package | awk -F'[:<=>]' '/^Depends/ {print $2}' | xargs -n1 | sort -u >> deplist

How about using pactree on either system...

pactree -us <pkgname>

This also avoids your Note 2 as it walks the entire dependency tree.

Last edited by Slithery (2017-08-30 10:13:28)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB