Community

Arch Linux - Pacman Issues

So, on a default Arch Linux install on the server pacman is completely unusable.

# pacman -Syy
:: Synchronizing package databases...
 core                    106.1K  278.8K/s 00:00:00 [######################] 100%
 extra                  1410.1K 1273.8K/s 00:00:01 [######################] 100%
 community              1762.9K 1446.1K/s 00:00:01 [######################] 100%
# pacman -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: The following packages should be upgraded first :
    pacman
:: Do you want to cancel the current operation
:: and upgrade these packages now? [Y/n] y

resolving dependencies...
looking for inter-conflicts...

Targets (15): linux-api-headers-3.4.4-1  glibc-2.16.0-2  libarchive-3.0.4-1
              ca-certificates-20120623-1  libssh2-1.4.2-1  curl-7.26.0-1
              pth-2.0.7-4  libksba-1.2.0-1  libassuan-2.0.3-1  pinentry-0.8.1-4
              dirmngr-1.1.0-4  gnupg-2.0.19-2  gpgme-1.3.1-4
              archlinux-keyring-20120622-1  pacman-4.0.3-3

Total Download Size:    0.00 MB
Total Installed Size:   57.67 MB

Proceed with installation? [Y/n] y
(15/15) checking package integrity                 [######################] 100%
(15/15) checking for file conflicts                [######################] 100%
error: failed to commit transaction (conflicting files)
glibc: /lib exists in filesystem
glibc: /usr/bin/tzselect exists in filesystem
glibc: /usr/sbin/zdump exists in filesystem
glibc: /usr/sbin/zic exists in filesystem
Errors occurred, no packages were upgraded.
# pacman -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: The following packages should be upgraded first :
    pacman
:: Do you want to cancel the current operation
:: and upgrade these packages now? [Y/n] n

:: Starting full system upgrade...
:: Replace libusb with core/libusbx? [Y/n] y
:: Replace module-init-tools with core/kmod? [Y/n] y
:: Replace procps with core/procps-ng? [Y/n] y
:: Replace udev with core/systemd-tools? [Y/n] y
resolving dependencies...
looking for inter-conflicts...

Remove (4): module-init-tools-3.16-1  udev-173-3  libusb-1.0.8-1
            procps-3.2.8-4

Total Removed Size:   3.48 MB

Targets (127): linux-api-headers-3.4.4-1  tzdata-2012c-1  glibc-2.16.0-2
               attr-2.4.46-2  acl-2.2.51-2  ncurses-5.9-3  readline-6.2.003-2
               bash-4.2.036-1  zlib-1.2.7-1  binutils-2.22-9  bzip2-1.0.6-4
               gcc-libs-4.7.1-4  db-5.3.21-1  cracklib-2.8.18-2
               pambase-20120701-1  pam-1.1.5-4  gmp-5.0.5-1  libcap-2.22-3
               coreutils-8.17-1  run-parts-4.3.2-1  cronie-1.4.8-2
               util-linux-2.21.2-5  pcre-8.31-1  libffi-3.0.11-1
               glib2-2.32.3-1  xz-5.0.4-1  libsystemd-186-2  kmod-9-2
               hwids-20120611-1  kbd-1.15.3-2  systemd-tools-186-2
               device-mapper-2.02.96-3  libgpg-error-1.10-2  libgcrypt-1.5.0-3
               popt-1.16-5  cryptsetup-1.4.3-1  expat-2.1.0-1
               filesystem-2012.6-4  shadow-4.1.5.1-1  dbus-core-1.6.2-2
               dhcpcd-5.5.6-1  gdbm-1.10-1  perl-5.16.0-2  openssl-1.0.1.c-1
               e2fsprogs-1.42.4-1  libsasl-2.1.23-9  libldap-2.4.31-4
               keyutils-1.5.5-3  krb5-1.10.2-2  idnkit-1.0-2
               dnssec-anchors-20120422-1  dnsutils-9.9.1.P1-1
               eventlog-0.2.12-3  file-5.11-1  findutils-4.4.2-4  gawk-4.0.1-1
               gettext-0.18.1.1-4  gpm-1.20.6-8  grep-2.13-1  gzip-1.5-1
               texinfo-4.13a-7  groff-1.21-2  heirloom-mailx-12.5-3
               iproute2-3.4.0-2  sysvinit-2.88-6  initscripts-2012.06.3-2
               iptables-1.4.14-2  sysfsutils-2.1.0-8  iputils-20101006-4
               jfsutils-1.1.15-3  less-444-3  libarchive-3.0.4-1
               libedit-20120311_3.0-1  libidn-1.25-1  libnl-3.2.11-1
               libusbx-1.0.12-2  libpcap-1.3.0-1  libpipeline-1.2.1-1
               libusb-compat-0.1.4-2  licenses-2.9-1  linux-firmware-20120625-1
               logrotate-3.8.1-2  lvm2-2.02.96-3  man-db-2.6.2-1
               man-pages-3.41-1  mdadm-3.2.5-2  mkinitcpio-busybox-1.20.1-1
               mkinitcpio-0.9.2-2  mtr-0.82-1  nano-2.2.6-2  netcfg-2.8.5-3
               net-tools-1.60.20110819cvs-3  ntp-4.2.6.p5-7  ldns-1.6.13-1
               openssh-6.0p1-3  sed-4.2.1-4  ca-certificates-20120623-1
               libssh2-1.4.2-1  curl-7.26.0-1  pth-2.0.7-4  libksba-1.2.0-1
               libassuan-2.0.3-1  pinentry-0.8.1-4  dirmngr-1.1.0-4
               gnupg-2.0.19-2  gpgme-1.3.1-4  pacman-mirrorlist-20120626-1
               archlinux-keyring-20120622-1  pacman-4.0.3-3  pciutils-3.1.10-1
               pcmciautils-018-4  ppp-2.4.5-3  procps-ng-3.3.3-3
               psmisc-22.19-1  reiserfsprogs-3.6.21-4  sudo-1.8.5.p2-1
               syslog-ng-3.3.5-2  tar-1.26-2  unzip-6.0-6  usbutils-006-1
               vim-runtime-7.3.600-1  vim-7.3.600-1  wget-1.13.4-1
               which-2.20-5  whois-5.0.17-1  wpa_supplicant-1.0-1
               xfsprogs-3.1.8-2

Total Download Size:    0.00 MB
Total Installed Size:   407.81 MB

Proceed with installation? [Y/n] y
(127/127) checking package integrity               [######################] 100%
(127/127) checking for file conflicts              [######################] 100%
error: failed to commit transaction (conflicting files)
glibc: /lib exists in filesystem
filesystem: /etc/mtab exists in filesystem
filesystem: /var/run exists in filesystem
initscripts: /etc/profile.d/locale.sh exists in filesystem
Errors occurred, no packages were upgraded.
# pacman -S glibc
:: The following packages should be upgraded first :
    pacman
:: Do you want to cancel the current operation
:: and upgrade these packages now? [Y/n] n

resolving dependencies...
looking for inter-conflicts...

Targets (2): linux-api-headers-3.4.4-1  glibc-2.16.0-2

Total Download Size:    0.00 MB
Total Installed Size:   38.38 MB

Proceed with installation? [Y/n] y
(2/2) checking package integrity                   [######################] 100%
(2/2) checking for file conflicts                  [######################] 100%
error: failed to commit transaction (conflicting files)
glibc: /lib exists in filesystem
glibc: /usr/bin/tzselect exists in filesystem
glibc: /usr/sbin/zdump exists in filesystem
glibc: /usr/sbin/zic exists in filesystem
Errors occurred, no packages were upgraded.

So, it's an error with glibc but I can't seem to get around it. Does anyone have any idea how to fix this?

10 Replies

Hey,

Silly stacked manual interventions!

Try running through these on a fresh deployment?

# Whenever prompted to update pacman first, answer no
# Answer yes to all other prompts
rm /etc/profile.d/locale.sh
rm -rf /var/run /var/lock
pacman -Syf filesystem
pacman -Sy tzdata
# Replace i686 with x86_64 for 64 bit systems
pacman -U http://pkgbuild.com/~allan/glibc-2.16.0-1-i686.pkg.tar.xz
pacman -Syu --ignore glibc
# This kicks the key generation to the background and runs mandb to generate some entropy
pacman-key --init &
while [ "$(ps aux | grep [p]acman-key | wc -l)" != "0" ] ; do mandb > /dev/null 2>&1 ; done
# You should verify the keys you're signing via other means
pacman-key --populate archlinux
rm -r /lib/modules
pacman -Syu
  • Les

So, I ran those, but had some issues with pacman-key. Namely, the command doesn't exist.

# pacman-key --init &
[1] 28184
-bash: pacman-key: command not found

But I pressed on, anyway.

# while [ "$(ps aux | grep [p]acman-key | wc -l)" != "0" ] ; do mandb > /dev/null 2>&1 ; done
[1]+  Exit 127                pacman-key --init
# pacman-key --populate archlinux
-bash: pacman-key: command not found

So I still pushed on, figuring maybe the other stuff fixed it:

# pacman -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: The following packages should be upgraded first :
    pacman
:: Do you want to cancel the current operation
:: and upgrade these packages now? [Y/n] n

:: Starting full system upgrade...
:: Replace libusb with core/libusbx? [Y/n] y
:: Replace module-init-tools with core/kmod? [Y/n] y
:: Replace procps with core/procps-ng? [Y/n] y
:: Replace udev with core/systemd-tools? [Y/n] y
resolving dependencies...
looking for inter-conflicts...

Remove (4): module-init-tools-3.16-1  udev-173-3  libusb-1.0.8-1
            procps-3.2.8-4

Total Removed Size:   3.48 MB

Targets (125): linux-api-headers-3.4.4-1  glibc-2.16.0-2  attr-2.4.46-2
               acl-2.2.51-2  ncurses-5.9-3  readline-6.2.003-2  bash-4.2.036-1
               zlib-1.2.7-1  binutils-2.22-9  bzip2-1.0.6-4  gcc-libs-4.7.1-4
               db-5.3.21-1  cracklib-2.8.18-2  pambase-20120701-1  pam-1.1.5-4
               gmp-5.0.5-1  libcap-2.22-3  coreutils-8.17-1  run-parts-4.3.2-1
               cronie-1.4.8-2  util-linux-2.21.2-5  pcre-8.31-1
               libffi-3.0.11-1  glib2-2.32.3-1  xz-5.0.4-1  libsystemd-186-2
               kmod-9-2  hwids-20120611-1  kbd-1.15.3-2  systemd-tools-186-2
               device-mapper-2.02.96-3  libgpg-error-1.10-2  libgcrypt-1.5.0-3
               popt-1.16-5  cryptsetup-1.4.3-1  expat-2.1.0-1  shadow-4.1.5.1-1
               dbus-core-1.6.2-2  dhcpcd-5.5.6-1  gdbm-1.10-1  perl-5.16.0-2
               openssl-1.0.1.c-1  e2fsprogs-1.42.4-1  libsasl-2.1.23-9
               libldap-2.4.31-4  keyutils-1.5.5-3  krb5-1.10.2-2  idnkit-1.0-2
               dnssec-anchors-20120422-1  dnsutils-9.9.1.P1-1
               eventlog-0.2.12-3  file-5.11-1  findutils-4.4.2-4  gawk-4.0.1-1
               gettext-0.18.1.1-4  gpm-1.20.6-8  grep-2.13-1  gzip-1.5-1
               texinfo-4.13a-7  groff-1.21-2  heirloom-mailx-12.5-3
               iproute2-3.4.0-2  sysvinit-2.88-6  initscripts-2012.06.3-2
               iptables-1.4.14-2  sysfsutils-2.1.0-8  iputils-20101006-4
               jfsutils-1.1.15-3  less-444-3  libarchive-3.0.4-1
               libedit-20120311_3.0-1  libidn-1.25-1  libnl-3.2.11-1
               libusbx-1.0.12-2  libpcap-1.3.0-1  libpipeline-1.2.1-1
               libusb-compat-0.1.4-2  licenses-2.9-1  linux-firmware-20120625-1
               logrotate-3.8.1-2  lvm2-2.02.96-3  man-db-2.6.2-1
               man-pages-3.41-1  mdadm-3.2.5-2  mkinitcpio-busybox-1.20.1-1
               mkinitcpio-0.9.2-2  mtr-0.82-1  nano-2.2.6-2  netcfg-2.8.5-3
               net-tools-1.60.20110819cvs-3  ntp-4.2.6.p5-7  ldns-1.6.13-1
               openssh-6.0p1-3  sed-4.2.1-4  ca-certificates-20120623-1
               libssh2-1.4.2-1  curl-7.26.0-1  pth-2.0.7-4  libksba-1.2.0-1
               libassuan-2.0.3-1  pinentry-0.8.1-4  dirmngr-1.1.0-4
               gnupg-2.0.19-2  gpgme-1.3.1-4  pacman-mirrorlist-20120626-1
               archlinux-keyring-20120622-1  pacman-4.0.3-3  pciutils-3.1.10-1
               pcmciautils-018-4  ppp-2.4.5-3  procps-ng-3.3.3-3
               psmisc-22.19-1  reiserfsprogs-3.6.21-4  sudo-1.8.5.p2-1
               syslog-ng-3.3.5-2  tar-1.26-2  unzip-6.0-6  usbutils-006-1
               vim-runtime-7.3.600-1  vim-7.3.600-1  wget-1.13.4-1
               which-2.20-5  whois-5.0.17-1  wpa_supplicant-1.0-1
               xfsprogs-3.1.8-2

Total Download Size:    0.00 MB
Total Installed Size:   402.09 MB

Proceed with installation? [Y/n] y
(125/125) checking package integrity               [######################] 100%
(125/125) checking for file conflicts              [######################] 100%
error: failed to commit transaction (conflicting files)
glibc: /lib exists in filesystem
Errors occurred, no packages were upgraded.

Nope. No success. So either it's an issue with the keys or that won't fix it. :(

I just tested this on a completely fresh Arch deployment, using exactly the commands I provided, answering "n" for all requests to upgrade pacman first, and "y" for all other requests, and it worked just fine. Full logs posted here:

http://pastie.org/4264103

If you're getting an error about pacman-key not existing, it's likely because the "pacman -Syu –ignore glibc" failed for some reason. If you've followed the commands precisely on a fresh deployment, this shouldn't happen. If it is, I'd be interested to see the logs from the commands prior to the "pacman-key --init".

  • Les

I don't know if it's because I'm using 32bit, not 64, but it still doesn't work on the freshest possible deployment.

http://pastie.org/4268042

NOTE: I ran pacman -Syu –ignore glibc twice. The first time I answered "n" to "Do you want to skip the above packages for this upgrade? [y/N]" the second time I answered y.

You skipped the following step:

pacman -U http://pkgbuild.com/~allan/glibc-2.16.0-1-i686.pkg.tar.xz

You need to run that before the pacman -Syu –ignore glibc, and make sure to not let it upgrade pacman by itself at any point.

I've tested this on 32 bit, and the only change for 64 bit would be replacing "i686" in the above command with "x86_64".

  • Les

Oh, duh. For some reason I thought that comment said to skip for non 64x systems. Anyway, that seemed to fix it. Thanks a ton!

Ha, was pretty damn lost with Arch update too - your instructions, Les, worked perfectly! Thanks!

I also wouldn't mind if a guide or two about Arch updating would be added to Wiki.

I second what ^ said. I think there should be some accessible resource on how to fix this, since it's an issue with the default build of Arch.

Is there any way to fully automate this script? I'm trying to create an automated server deployment script (which includes installing apache etc.) so first I need to get the arch installation up to date..

Thank you,

Brendan

Hmm… about a 'wiki' on how to update it, that would get outdated within an hour :P. I would recommend you read the announcements on the Arch Linux website whenever you need to update arch, since it isn't 'that simple'. Mailing list would also be a good idea, as they generally notify of breaking changes.

Edit: Forgot to mention that if you would like to get more help with arch the bbs https://bbs.archlinux.org/ and the wiki https://wiki.archlinux.org/ are a good starting point for issues that aren't linode specific, not saying you can't ask for help here, and again, checking the news and signing up to the mailing list is a very good idea.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct