You are not logged in.
Pages: 1
I just did a pacman -Syu and something went terribly wrong.
Whenever i try to install a new program i get something like this:
$ pacman -S glibc
warning: glibc-2.10.1-3 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...
Targets (1): glibc-2.10.1-3
Total Download Size: 0.00 MB
Total Installed Size: 31.47 MB
Proceed with installation? [Y/n]
checking package integrity...
(1/1) checking for file conflicts [##############################] 100%
(1/1) upgrading glibc [##############################] 100%
/tmp/alpm_ZLRuBH/.INSTALL: line 39: ldconfig: command not found
/tmp/alpm_ZLRuBH/.INSTALL: line 40: init: command not found
Generating locales...
en_US.UTF-8... done
en_US.ISO-8859-1... done
Generation complete.
sh: ldconfig: command not found
error: command failed to execute correctly
Checking the integrity of the local database in /var/lib/pacman/
any ideas?
Offline
workaround: put /sbin back in your path or do not upgrade using sudo. This will be fixed in 3.3.1
Offline
so is this a pacman issue?
Offline
yes - it was not spotted during testing as most people have /sbin in their path
Offline
please could you guide me a little bit how to do it ( change the path ) ? I just did a fresh install on a new laptop and a feel like without hands withou pacman working thanks a lot
Offline
You should not have to by default... The default /etc/profile contains:
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
so you should have /sbin in your path.
Offline
i feel like a dumb tried what I think was the solution based on your guide, unsuccesfull sorry but I need solution in copy paste format if you dont mind, your help will be really appreciated, thanks again
Offline
To add sbin:
export PATH="/bin:/usr/bin:/sbin:/usr/sbin"
But it will be removed after logout, so u need add this command to your .bashrc file
Last edited by tmi999 (2009-08-11 13:27:40)
Offline
gofree: Why isn't it default on your system ?
Offline
Same problem with screen, /sbin is in my path, I have nothing strange in my .screenrc
Normal:
[jordz@jordz-server ~]$ echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core
Screen:
[jordz@jordz-server ~]$ echo $PATH
/usr/bin:/bin
Offline
I'm having the same problem and have /sbin in my path.
Offline
I noticed that when you start screen from /etc/rc.local, /etc/profile doesn't get sources.
Starting screen manually works well.
Offline
Anyway pacman 3.3.1 is released and is in testing now.
But it looks like you all have pretty weird issues with $PATH that you need to investigate and fix.
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
Have all the users with GNOME started a root's Terminal window???
I've noticed that using the Gnome's root terminal messes up the $PATH variable (as of today)... when i start archlinux (note: i don't use GDM) my path is:
/bin:/usr/bin:/sbin:/usr/sbin....
and many other items... but when a root terminal is started inside gnome, $PATH changes to:
/usr/ucb:/bin:/usr/bin:/etc
And ldconfig will fail... (and any other tool in /sbin) this change is restricted to this window only. If you exit the root terminal and go to a normal terminal, the path is what is expected.
This happens on a clean reformatted machine, installed archlinux, doing a pacman -Syu, installing gnome and all extras (including system administrations tools) (as tested today).
Maybe some config file is messed or is a bug from the Gnome guys...
Anyways the only workaround i can think is to start a normal terminal (for the guys that use gnome or use GDM to start their machines) and in the terminal doing a "su -" to got root access (of course will ask for the password) and then update/install/whatever you want with pacman.
And sorry about my english.
J.
Last edited by stargeizer (2009-09-24 14:35:10)
Offline
I'm sorry to add more fuel to the fire here, but:
My $PATH variable looks okay:
/bin:/usr/bin:/sbin:/usr/sbin:/opt/java/jre/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core
But I still can't upgrade with "sudo pacman -S*" without getting the:
sh: ldconfig: command not found
error: command failed to execute correctly
error, although things seem fine when I upgrade packages as root. I'm using the 3.3.0-3 version of pacman. Should I bother reporting this bug, or just login as root to upgrade until the new pacman is released?
The only thing I don't have that isn't available from uncommenting lines the default sudoers file is:
Defaults env_keep="EDITOR VISUAL"
Offline
I don't know if this is a right way to check, but maybe you could check the output of "sudo echo $PATH" ?
Otherwise 3.3.1 is out. It is just that the package is still in testing repo.
I am not sure how reporting a bug would help. We can not fix the same problem twice
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
My $PATH still looks the same w/ "sudo echo $PATH$ ... but "sudo env" will show that my sudo path is screwed up, guess I'll have to read the sudo Docs to fix it...
Offline
sudo echo $PATH will show the $PATH of the calling user (at least that seems to be the case, please correct me if I'm wrong here).
To see the $PATH of the root user, you'll need to:
sudo su
echo $PATH
In my case, adding /sbin and /usr/sbin to the $PATH and reinstalling all affected packages seemed to do the trick.
Offline
On a side note, why was I seeing this issue? I didn't have /sbin and /usr/sbin in root's $PATH, but I am running pacman v3.3.3.
Last edited by jalu (2010-05-23 19:10:43)
Offline
On a side note, why was I seeing this issue? I didn't have /sbin and /usr/sbin in root's $PATH, but I am running pacman v3.3.3.
Well I don't know how that's possible, pacman v3.3.3 uses full path to ldconfig, so as long at it exists, it should find it.
lib/libalpm/util.c: _alpm_run_chroot(root, "/sbin/ldconfig");
Are you using pacman on a normal system or in a chroot ? If the latter, ldconfig must be inside the chroot.
You could have a look at pacman --debug output , maybe strace too. And if that doesn't help, add some more debugging in the C code.
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
Not using chroot, no. I'll take a look at pacman --debug next time I'm upgrading something that involves ldconfig. Thanks for the tip.
Offline
Hm, it does seem to be related to chroot. This is the output of pacman --debug:
debug: adding entry 'glibc' in 'local' cache
debug: executing ". /tmp/alpm_U4rgRh/.INSTALL; post_upgrade 2.12-4 2.12-4" under chroot "/"
debug: chrooting in /
/tmp/alpm_U4rgRh/.INSTALL: line 6: ldconfig: command not found
/tmp/alpm_U4rgRh/.INSTALL: line 7: init: command not found
Generating locales...
en_US.UTF-8... done
en_US.ISO-8859-1... done
Generation complete.
debug: call to waitpid succeeded
debug: running ldconfig
debug: executing "/sbin/ldconfig" under chroot "/"
...
Very interesting. What is chroot exactly? I read the ArchWiki article but don't exactly understand why pacman uses it. How do I stop using pacman from using it, or am I doing something wrong?
Last edited by jalu (2010-06-27 02:29:21)
Offline
jalu wrote:On a side note, why was I seeing this issue? I didn't have /sbin and /usr/sbin in root's $PATH, but I am running pacman v3.3.3.
Well I don't know how that's possible, pacman v3.3.3 uses full path to ldconfig, so as long at it exists, it should find it.
lib/libalpm/util.c: _alpm_run_chroot(root, "/sbin/ldconfig");Are you using pacman on a normal system or in a chroot ? If the latter, ldconfig must be inside the chroot.
You could have a look at pacman --debug output , maybe strace too. And if that doesn't help, add some more debugging in the C code.
This is not pacman calling ldconfig but glibc calling it in post_install/upgrade. There the full path is not used and people without /sbin in their path run into issues.
Offline
Very interesting. Thanks for the tip, Allan.
It looks like my solution was to:
1. sudo visudo
2. Add PATH to the env_keep section.
Does this seem like a reasonable solution to everyone, or am I doing something atypical?
Offline
Pages: 1