November 12, 2019, 09:41:50 pm

News:

SMF - Just Installed!


Archlinux upgrade ?

Started by bsrdjan, September 18, 2012, 02:14:17 pm

Previous topic - Next topic

bsrdjan

Hello,

I installed the Arch Linux image on SD card, following the instructions on Archlinux web page.

All seem to work fine but when I try to sync Arch, using pacman -Syu, I am getting following error (at the bottom).

Any ideas what goes wrong?

:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
alarm is up to date
aur is up to date
:: Starting full system upgrade...
:: Replace libsystemd with core/systemd? [Y/n]
:: Replace systemd-tools with core/systemd? [Y/n]
resolving dependencies...
looking for inter-conflicts...

Targets (20): binutils-2.22-10  cracklib-2.8.19-1  dhcpcd-5.6.2-1  filesystem-2012.8-1
              glibc-2.16.0-4  hwids-20120831-1  inetutils-1.9.1-4
              initscripts-2012.08.3-2  kmod-10-1  less-451-1  libedit-20120601_3.0-1
              libsystemd-188-2 [removal]  openssh-6.1p1-2  pacman-mirrorlist-20120916-1
              ppp-2.4.5-4  syslog-ng-3.3.6-1  systemd-189-4
              systemd-tools-188-2 [removal]  sysvinit-2.88-7  sysvinit-tools-2.88-7

Total Installed Size:   66.54 MiB
Net Upgrade Size:       5.02 MiB

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



Thanks and regards,
srdjan

bsrdjan

September 18, 2012, 09:01:48 pm #1 Last Edit: September 18, 2012, 09:35:26 pm by bsrdjan
tried this and did not work, still can't upgrade glibc
https://wiki.archlinux.org/index.php/DeveloperWiki:usrlib ....

davidjf2001

I did not have this problem. I installed the package from the archlinuxarm website exactly as described on the site, including getting the kernel from the /boot directory. All installed fine. I installed many packages most frequently with the -Sy option. I did not use -u.

xxcn

If the glibc upgrade fails (after `pacman -Syu --ignore glibc,curl`) you must be having files under /lib which are not owned by any package. Identify them with

find /lib -exec pacman -Qo -- {} +

You can then either move those to /usr/lib or remove them if you think they are no longer needed. The upgrade should work with no problems after this.

DO NOT TRY TO FORCE THIS UPGRADE. It will break your system.

Quirks like this are a small price to pay compared with having to wait 6 months to a year for a new OS version and going through a usually painful system upgrade.

Kean

I found it was the pcmciautils package that was still a holder on /lib
I'm not sure this package is needed, so seems easiest to remove it

The following commands worked for me on 4 different OLinuXino's (Maxi & Micro)

pacman -Syu --ignore glibc
pacman -R pcmciautils
pacman -Su

Kean

bsrdjan

Kean, thanks a lot! I created SD card following Archlinuxarm.org instructions and all steps worked as you described but the problem occurc during glibc installation (the last step).

I am getting "memory exausted" error, like below. Any ideas how to solve that?

[root@alarm ~]# pacman -Su
:: Starting full system upgrade...
resolving dependencies...
looking for inter-conflicts...

Targets (1): glibc-2.16.0-4

Total Download Size:    7.63 MiB
Total Installed Size:   33.75 MiB
Net Upgrade Size:       0.10 MiB

Proceed with installation? [Y/n]
:: Retrieving packages from core...
glibc-2.16.0-4-arm                            7.6 MiB   688K/s 00:11 [######################################] 100%
(1/1) checking package integrity                                      [######################################] 100%
(1/1) loading package files                                           [######################################] 100%
(1/1) checking for file conflicts                                     [######################################] 100%
(1/1) checking available disk space                                   [######################################] 100%
(1/1) upgrading glibc                                                 [######################################] 100%
Generating locales...
  en_US.UTF-8...memory exhausted

Kean

Hmmmm... not sure.
I've actually created a swap partition on my uSD for now to avoid memory exhaustion during dev.
Not ideal for longer term due to extra flash writes, but very handy during initial testing.

First I used gparted on a Ubuntu machine with a USB to uSD adapter to resize /dev/sdX2 down by 257MB
Then again using gparted I created an extra partition as Linux Swap in that free space
I found I had to leave 1MB gap between the partitions - can't remember why though
Make sure you run sync before unplugging the card

After booting again on the modified uSD, you just need to run:
echo 1 >/proc/sys/vm/swappiness
mkswap /dev/mmcblk0p3
swapon /dev/mmcblk0p3

Then run your upgrade again.

Setting swappiness to 1 reduces swap usage to only when really needed.  The default of 60 makes the system quite slow, and obviously wears out the flash quicker.

If you want to keep the swap space without running those commands after each boot
edit /etc/sysctl.conf and set vm.swappiness=1
and in /etc/fstab add the following:
/dev/mmcblk0p3  none    swap    defaults        0       0
and reboot

Kean

bsrdjan


xxcn

The RAM on board is not enough to generate UTF-8 locales. When we worked on support for the board this issue was left unsolved. One possible solution is to disable the UTF-8 locale in /etc/locale.gen, which somewhat cripples the system but most people can live with it.

If you insist on UTF-8, you'll need to enable swap every time glibc is upgraded.