You are not logged in.

#1 2012-10-01 20:22:08

mpz
Member
Registered: 2010-10-14
Posts: 54

[SOLVED] pacman -Rdd glibc FAIL

I tried to remove and then re-install packages listed by
grep in wiki

[user@alien ~]$ grep '^lib/' /var/lib/pacman/local/*/files
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/ld-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/ld-linux-x86-64.so.2
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libBrokenLocale-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libBrokenLocale.so.1
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libSegFault.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libanl-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libanl.so.1
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libc-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libc.so.6
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libcidn-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libcidn.so.1
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libcrypt-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libcrypt.so.1
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libdl-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libdl.so.2
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libm-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libm.so.6
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libmemusage.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libnsl-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libnsl.so.1
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libnss_compat-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libnss_compat.so.2
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libnss_db-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libnss_db.so.2
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libnss_dns-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libnss_dns.so.2
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libnss_files-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libnss_files.so.2
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libnss_hesiod-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libnss_hesiod.so.2
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libnss_nis-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libnss_nis.so.2
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libnss_nisplus-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libnss_nisplus.so.2
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libpcprofile.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libpthread-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libpthread.so.0
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libresolv-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libresolv.so.2
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/librt-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/librt.so.1
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libthread_db-1.0.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libthread_db.so.1
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libutil-2.16.so
/var/lib/pacman/local/glibc-2.16.0-1/files:lib/libutil.so.1
/var/lib/pacman/local/lib32-glibc-2.15-10/files:lib/
/var/lib/pacman/local/lib32-glibc-2.15-10/files:lib/ld-linux.so.2
[user@alien ~]$ sudo pacman -Rdd lib32-glibc

Targets (1): lib32-glibc-2.15-10

Total Removed Size:     14.16 MiB

Do you want to remove these packages? [Y/n] y
(1/1) removing lib32-glibc                               
[user@alien ~]$ sudo pacman -Rdd glibc
warning: glibc is designated as a HoldPkg.
HoldPkg was found in target list. Do you want to continue? [y/N] y

Targets (1): glibc-2.16.0-1

Total Removed Size:     37.59 MiB

Do you want to remove these packages? [Y/n] y
(1/1) removing glibc                                                                                                           [#############################################################################] 100%
warning: /etc/locale.gen saved as /etc/locale.gen.pacsave

and now I can't execute any command.

[user@alien ~]$ pacman -S glibc
bash: /usr/bin/pacman: No such file or directory

I have not updated my system in months. Any way to recover from this? Thank you.

Last edited by mpz (2012-10-02 12:50:40)

Offline

#2 2012-10-01 20:29:59

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

Re: [SOLVED] pacman -Rdd glibc FAIL

It seems you missed the bolded text in the very section of the wiki you refer to that says "other than glibc".  This is a good candidate entry for the thread on "dumbest computing mistakes made".

For the solution I'd suggest following the instructions perhaps in that wiki page, or in other threads on similar issues to boot into some sort of live media, chroot, and fix your system.


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

Online

#3 2012-10-01 20:37:36

mpz
Member
Registered: 2010-10-14
Posts: 54

Re: [SOLVED] pacman -Rdd glibc FAIL

Fair, I did it because pacman -Su was still failing. Can you point me in the right direction? Will booting from live media and coping glibc let me execute commands? I'm a little confused why removing glibc renders command line useless.

Offline

#4 2012-10-01 20:56:58

techryda
Member
Registered: 2012-10-01
Posts: 50

Re: [SOLVED] pacman -Rdd glibc FAIL

You need to strive for understanding if you're going to continue using Arch.  It's simple, powerful and unforgiving if you just blindly copy and paste commands you read somewhere.

Try to understand what each command you enter does before doing it.  Otherwise, you might want to try another distro.  I started using Arch in 2006 and I've gained more understanding then
I ever could have if I'd have stayed with the distros where, as Mark Shuttleworth says, "we have root"
The benefit/curse of other distros is that they basically maintain your system for you.  It's like the difference between renting or owning a home.  With a rental, maintenace is up to the landlord.
Ownership comes w/ responsibility

Arch is about taking ownership of your OS.

Lecture over.

Here's how to fix it.

Boot off of an Arch livecd
Establish internet access
Mount your root (the one you just hosed)
And with careful consideration of the pacman options, reinstall glibc to your root

Last edited by techryda (2012-10-01 21:00:20)

Offline

#5 2012-10-01 22:51:06

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

Re: [SOLVED] pacman -Rdd glibc FAIL

Glibc is a very basic part of the system on which *many* (most?) other programs and tools rely.  Glibc provides shared libraries that are used by nearly every program - if you've ever looked at any C code, near the top you'll see lines like "#include <stdlib.h>" and "#include <stdio.h>", these header files are provided by glibc.  The header files are not necessary for your computer to run (but are to compile anything new), but the libraries that are referred to by those headers are required.  If glibc is gone, those shared library files are gone.  Without these basic shared libraries, only statically linked binaries, or programs that don't require these very fundamental libraries can run.  As nothing is statically linked (by default) in arch, the absence of glibc results in a severely handicapt system.  If you are curious, you can google around on "C standard libraries" and "dynamic linking".

But all that is rather 'academic'.  To fix your system follow techryda's advice.  Also see the wiki page on chroot, or the many other threads of other users who found creative ways of botching the glibc update.  Simply tryng to copy glibc files over would almost certainly lead to a whole new set of headaches - but a little reading of the appropriate docs should make this relatively easy to fix with a live media, chroot, and pacman.


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

Online

#6 2012-10-01 23:10:40

mpz
Member
Registered: 2010-10-14
Posts: 54

Re: [SOLVED] pacman -Rdd glibc FAIL

I'm in chroot now but when I try to install glibc i get

pacman -S glibc
error: could not open file /var/lib/pacman/sync/core.db: Failed to open '/var/lib/pacman/sync/core.db'
...
same for extra.db and community.db
...
error: target not found: glibc

I do not have /var/ on a separate partition so I only mounted boot, root and home.

Any ideas?

This is my work laptop that I must get functional again today so swift responses are appreciated.

Last edited by mpz (2012-10-01 23:12:18)

Offline

#7 2012-10-01 23:13:59

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

Re: [SOLVED] pacman -Rdd glibc FAIL

try doing a pacman -Syy first.

Offline

#8 2012-10-01 23:28:50

mpz
Member
Registered: 2010-10-14
Posts: 54

Re: [SOLVED] pacman -Rdd glibc FAIL

Thank you Scimmia.

Pacman was able to successfully retrieve packages but

error: failed to commit transaction (conflicting files)
glibc: /lib exists in filesystem
...
same for /usr/bin/tzselect /usr/sbin/zdump /usr/sbin/zic
...
Errors occured, no packages were upgraded.

Offline

#9 2012-10-01 23:30:09

mpz
Member
Registered: 2010-10-14
Posts: 54

Re: [SOLVED] pacman -Rdd glibc FAIL

Heh, now that I think about it, I'm at the same spot where I hosed my system

Offline

#10 2012-10-01 23:37:35

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

Re: [SOLVED] pacman -Rdd glibc FAIL

Offline

#11 2012-10-01 23:42:21

techryda
Member
Registered: 2012-10-01
Posts: 50

Re: [SOLVED] pacman -Rdd glibc FAIL

If your sync dbs aren't there you have bigger problems?  Im assumung they were there earlier and you didn't do anything to delete them recently.

My idea was to run pacman from outside of your system (i.e. not in a chroot) and use the --dbpath and --r to install glibc into your mounted root

First you need to find out where /var/lib/pacman/sync/core.db went.  Do you have more than one Linux install on this hard drive?

Edit: Three posts happened in between me writing this.(ignore)

Last edited by techryda (2012-10-01 23:44:12)

Offline

#12 2012-10-02 00:21:22

mpz
Member
Registered: 2010-10-14
Posts: 54

Re: [SOLVED] pacman -Rdd glibc FAIL

Looks like i can't start chroot, per chroot wiki

chroot . /bin/bash
chroot: failed to run command `/bin/bash': No such file or directory

Both /bin/bash and /mnt/arch/bin/bash exist, so I'm confused why the error.

Offline

#13 2012-10-02 00:25:40

mpz
Member
Registered: 2010-10-14
Posts: 54

Re: [SOLVED] pacman -Rdd glibc FAIL

Found this but it looks dangerous

Offline

#14 2012-10-02 00:33:17

techryda
Member
Registered: 2012-10-01
Posts: 50

Re: [SOLVED] pacman -Rdd glibc FAIL

It seems you're entering commands w/o understanding again....what directory are you in when you run chroot

man chroot

Were you ever chrooted in?...a few post back you said you were?

The frantic commands you're entering are going to screw up your system.  Take a step back and try to understand each command.

here's some more help:

chroot [path/to/screwed/root]

Offline

#15 2012-10-02 00:42:15

mpz
Member
Registered: 2010-10-14
Posts: 54

Re: [SOLVED] pacman -Rdd glibc FAIL

I understand chroot, I recently set one up for an SFTP server. I was in /mnt/arch. I was not chrooted in, I though I was but I wasn't. I attempted to start chroot properly per wiki's instructions

chroot . /bin/bash

from /mnt/arch, which is the screwed root partition I mounted.

Offline

#16 2012-10-02 00:46:32

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

Re: [SOLVED] pacman -Rdd glibc FAIL

Perhaps there is no need to chroot.  If you live media is arch install media (or any arch with install scripts) you can use pacstrap /mnt glibc.

Alternately you can use the live media's pacman with the alternate install root options.


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

Online

#17 2012-10-02 00:56:49

techryda
Member
Registered: 2012-10-01
Posts: 50

Re: [SOLVED] pacman -Rdd glibc FAIL

(chrooting to a path from within that path just seems wrong to me, but I guess it could work)

Well, then my best guess is that you can't chroot in because chroot can't run bash, because bash needs glibc, which you removed.

If the only files in /lib are owned by glibc then just delete them, remove /lib, create a symlink from /lib to /usr/lib
And then I'm back to my original suggestion, run pacman from outside of the chroot, pointing to the /hosedroot and the db within the /hosedroot

man pacman, focus on the --dbpath and -r commands

Offline

#18 2012-10-02 12:46:41

mpz
Member
Registered: 2010-10-14
Posts: 54

Re: [SOLVED] pacman -Rdd glibc FAIL

Got past glibc problem.

Only when I moved all unowned files, while in chroot, from lib/ to usr/lib/ and deleted empty lib/, did glibc upgrade.

Now, I cant boot due to GRUB Legacy unable to locate my patition. But thats another issue. Marking this one solved.

Thank you and look for another thread from me tongue

Offline

#19 2012-10-02 12:57:26

techryda
Member
Registered: 2012-10-01
Posts: 50

Re: [SOLVED] pacman -Rdd glibc FAIL

Glad to hear it!

Last tip: Upgrade regularly, or not at all.  Either is fine, until you need a new package for some reason.

Good luck.

Offline

#20 2012-10-02 15:39:40

mpz
Member
Registered: 2010-10-14
Posts: 54

Re: [SOLVED] pacman -Rdd glibc FAIL

For completeness, running

mkinitcpio -p linux

from chroot got me past the "Unable to find root device" error. After that, I could not get past run level 3. Xorg.log stated that it could not locate NVIDIA drivers so I reinstalled. Posting this from a fully functional and current ArchLinux...what PITA!

Offline

Board footer

Powered by FluxBB