Upgrading glibc

Problems with packages? Post here, using [tags] of the package name.

Upgrading glibc

Postby attos » Thu Sep 20, 2012 1:11 pm

NEVER FORCE GLIBC, THESE ARE DANGEROUS INSTRUCTIONS

Hello all,

Yesterday I had trouble upgrading my systems running Arch Linux Arm and I just want to share my experience and how I fixed it.

I run Arch Linux Arm on a Sheeva plug, a Pogoplug and a Raspbery Pi and the solution worked for all of them.

I first tried to upgrade the packages on the RPi with pacman -Syu and got a conflict with glibc.

$this->bbcode_second_pass_code('', 'error: failed to commit transaction (conflicting files)
glibc: /lib exists in filesystem
Errors occurred, no packages were upgraded')

Searching for the fix I found that the lib directory becomes a symlink according to the following page:
https://www.archlinux.org/news/the-lib-directory-becomes-a-symlink/

The solution according to https://wiki.archlinux.org/index.php/DeveloperWiki:usrlib is to:
$this->bbcode_second_pass_code('', 'pacman -Syu --ignore glibc
pacman -Su')

I tried it several times with no success. There is a warning on the previuos page not to use the --force switch. This is because forcing glibc to upgrade removes the /lib directory contents making the system unusable and requiring to boot from a boot CD and using the console, which are not avail on my systems.

Digging a bit further I found a way on how to upgrade glibc and is as follows:

Open two ssh connections to the RPi logging in as root.

On the first one install busybox (pacman -S busybox). Busybox is a group of self-contained commands that do not depend on glibc.

Once busybox is installed issue the following commands:

$this->bbcode_second_pass_code('', 'busybox sh
cd /')

On the second connection you will force glibc to upgrade:

$this->bbcode_second_pass_code('', 'pacman --force -S glibc')

After doing this your /lib directory should be empty or non existent and anything you try to execute will return with an error.

Go back to the first connection (the one running busybox) and issue the following commands:

$this->bbcode_second_pass_code('', 'rm -rf lib
ln -s usr/lib /lib')

(please use usr/lib and not /usr/lib)
At this moment the second connection should work again and your system will be updated.

I hope this helps, but I'm not responsible of any damages.
Last edited by WarheadsSE on Thu Sep 20, 2012 10:08 pm, edited 1 time in total.
Reason: adding warnings...
attos
 
Posts: 3
Joined: Thu Sep 20, 2012 12:35 pm

Re: Upgrading glibc

Postby WarheadsSE » Thu Sep 20, 2012 1:26 pm

Forum search would have greatly helped here.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Upgrading glibc

Postby lulo » Thu Sep 20, 2012 10:01 pm

how to "rm -f ... " can not login for ssh ?...can upgrade witch --force not worked any command for my iconnect...i'am install new archlinux again...any other application, modyfication and clear first boot and first running pacman...any other...any...only "pacman -Syuf" after can upgrade only pacman...can install glibc with "-f" totaly crash everything...not more login, command...any other...null...system crash and dead...reboot...you ar never my login...any...totaly bad...*****...and orange...how to install for "no problem" this upgrade ?...how ?...pleas help !

P.S. can possible pleas update latest fw for armv5te...for this problematicaly and bad issue for this package (can use pacman = never run normaly...boot stoping and not ended - view for use my serial cable for iconnect)

EDIT: very sorry...I read not exactly for end...its fact...worked this issue...perfectly and any problem...thx...apologise for "my panic" :roll:
...and...
its fact...upgrade ArchLinuxARM-armv5te-latest.tar.gz and other ...of course if required...it would be advisable...thx
:D
lulo
 
Posts: 90
Joined: Mon Nov 28, 2011 1:19 am

Re: Upgrading glibc

Postby ebbix » Fri Sep 21, 2012 1:46 pm

Using busybox is a good idea :D
I did the /lib symlink switch manually some weeks ago. I connected my rootfs to another computer, moved everything from lib to /usr/lib and created the symlink.
When glibc was finally updated to switch to /usr/lib, it had some conflicts, --force solved them :lol:
ebbix
 
Posts: 48
Joined: Fri Aug 10, 2012 1:55 pm

Re: Upgrading glibc

Postby bro150 » Mon Sep 24, 2012 3:26 am

Thank you so much for the instructions on how to do this! I crashed my box like lulo and was not able to execute any commands. Had to start over. Even after starting from scratch still had to perform these instructions to get past. Wish I would have found this post earlier...
bro150
 
Posts: 1
Joined: Fri Jul 06, 2012 7:21 pm


Return to Packages

Who is online

Users browsing this forum: No registered users and 5 guests