You are not logged in.
Some users had pain during the move of the openssl rebuilds to the main repos. Often this seems to be because they were upgrading against mirrors that hadn't fully synched. For whatever reason, some users found themselves with a broken pacman, and didn't know how to fix it. The solutions have been posted in several places. I'm making this new thread for easy reference. I don't know if anyone is still going to need it for the current round of upgrades. But the principles are simple and really should be known by the typical Arch user.
The basic idea is: get ahold of the necessary packages, either from your cache or by downloading it. Manually untar them onto your root. Then you should have a working pacman binary. Then use that to *reinstall* the packages to make sure your pacman db is in synch with what you actually have on your system.
Here's a script that would have worked to fix a broken pacman during the openssl upgrades:
#!/bin/bash
arch=x86_64
mirror=http://mirror.rit.edu/archlinux
# link to cache (or download) and extract: openssl,libarchive,libfetch,pacman
cd /tmp
for pkg in openssl-1.0.0-2 libarchive-2.8.3-3 libfetch-2.30-3 pacman-3.3.3-5; do
pkgname=${pkg}-${arch}.pkg.tar.gz
if [[ -e /var/cache/pacman/pkg/${pkgname} ]]; then
ln -sf /var/cache/pacman/pkg/${pkgname} .
else
wget ${mirror}/core/os/${arch}/${pkgname} || exit 1
fi
sudo tar -xvpf ${pkgname} -C / --exclude .PKGINFO --exclude .INSTALL || exit 1
done
# now reinstall using pacman to update the local pacman db
sudo pacman -Sf openssl libarchive libfetch pacman || exit 1
# now update your system
sudo pacman -Syu
Others should feel free to enhance/criticize/suggest changes.
Offline
arch=x86_64
That will give you ELF errors if your system is i686 - which is kinda bad when you already have a broken pacman .
Also maybe instead of just untarring/replacing pacman.conf, the current pacman.conf could be backed up and replace the default one *after* untar; the ones relying to "Server =" lines in pacman.conf can't download anything with pacman without fixing pacman.conf manually. You might have other settings there that you want to preserve, too.
Last edited by algorythm (2010-04-10 22:43:39)
“Talent you can bloom. Instinct you can polish.” — Haikyuu!! (adapted)
“If everybody thought alike, no one would be thinking very much.” — Walter Lippmann (adapted)
“The important thing is to be able, at any moment, to sacrifice what we are for what we could become.” — Charles Dubois
Offline
add something like
arch=i686
[ `uname -m` = "x86_64" ] && arch=x86_64
Offline
or just arch=$(uname -m)
You could also wget the core.db.tar.gz, run bsdtar tf on it and grep the output to get the correct pacman, libfetch etc. versions.
Or in general: see if you manage to get pacman compiled statically.
Offline
I think profjim placed that "arch=" in a variable so that users could enter there own as needed.
but this would do it too
arch=`uname -m`
Exactly. I knew one could look the arch up, but I was too lazy to remember how.
Thanks for the improvements!
Offline
Hi (and sry for my english ) ,
i just ran into the same problem but my wget refused to work too (because of libssl.so.0.9.8...)
Download the newest source for wget on another computer and copy it to a usb flash drive.
(http://ftp.gnu.org/pub/gnu/wget/wget-1.12.tar.bz2)
Plug it to the computer that runs Arch and mount it to /mnt, then:
#cd /mnt
#tar xfj wget-1.12.tar.bz2
#cd wget-1.12
#./configure --without-ssl && make && make install
On my system it installed to /usr/local/bin/wget
Download Profjim's script (I hadn't X installed)
#/usr/local/bin/wget http://bbs.archlinux.org/viewtopic.php?id=95007
and get it with your bare hands
#vi viewtopic.php?id=95007 && mv viewtopic.php?id=95007 script.sh && chmod u+x script.sh
Then, I made some changes (#vi script.sh):
#!/bin/bash
arch=$(uname -m)
mirror=http://mirror.rit.edu/archlinux
# link to cache (or download) and extract: openssl,libarchive,libfetch,pacman
cd /tmp
for pkg in openssl-1.0.0-2 libarchive-2.8.3-3 libfetch-2.30-3 pacman-3.3.3-5; do
pkgname=${pkg}-${arch}.pkg.tar.gz
if [[ -e /var/cache/pacman/pkg/${pkgname} ]]; then
ln -sf /var/cache/pacman/pkg/${pkgname} .
else
/usr/local/bin/wget ${mirror}/core/os/${arch}/${pkgname} || exit 1
fi
tar -xvpf ${pkgname} -C / --exclude .PKGINFO --exclude .INSTALL || exit 1
done
# now reinstall using pacman to update the local pacman db
pacman -Sf openssl libarchive libfetch pacman || exit 1
# now update your system
pacman -Syu
Now just type
#./script.sh
Offline
I'd actually prefer if pacman.static would still build. (it didn't, last time I checked, and nobody of the pacman devs seems to give a shit)
I'd also like a freebsd-alike /stand with statically linked coreutils for emergency cases... maybe as an extra package and based on busybox or something. (although this might not be completely related to this thread)
Offline
Hi, I have a VPS that offers Archlinux, but it is version 0.8. Very old, with pacman 2.9.3 or something like that. I have searched for hours to try to get everything updated, keep finding problems. This was actually working, but after running it, pacman stops working because of missing library dependencies. I have been able to figure out which packages I need to update to fix these broken deps, and installing them using this method, which worked up until GLIBC had to be updated. Now this maybe a stupid question, but I haven't been able to figure it out: How do I decompress .tar.xz files? I already installed xz-utils, and I assume that has something to do with it, but for the life of me I can't figure out how to use any of it, and when I type man xz-utils I get nothing.
Offline
The binary is named xz
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Oh gee, some hard brain work prevailed and I answered my own question by typing 'xz' and hitting tab twice, which brought up a few programs, the most notable being xzdec, so I typed 'xzdec -h' to find that xzdec sends to std. output, so 'xzdec glibc*********.tar.xz > glibc***********.tar' was all it took to carry on. Will post whether or not it works in the end for anyone trying to upgrade from arch 0.8 to current.
Offline
The binary is named xz
gee, that may have been easier. lol. well my way worked and i am currently upgrading my system. thanks though.
Offline
Unfortunately the link to that mirror was dead...
I had a broken pacman, but the dependencies were ok. So I just did:
wget ftp://mirror.aarnet.edu.au/pub/archlinux/core/os/i686/pacman-3.5.1-1-i686.pkg.tar.gz
sudo tar -xvpf pacman-3.5.1-1-i686.pkg.tar.gz -C / --exclude .PKGINFO --exclude .INSTALL
I got the mirror from /etc/pacman.d/mirrorlist
EDIT: code snippets.
Last edited by yochaigal (2011-03-24 06:11:54)
Offline
you tried solve it with this way: https://wiki.archlinux.org/index.php/Kernel_Panics
just their difference is that must replace "kernel" with "pacman". I think being solved.
Offline
how about yaourt pacman to reinstall pacman?
Offline
how about yaourt pacman to reinstall pacman?
In what sense? yaourt is a pacman wrapper and it needs pacman to e.g. install packages.
Last edited by karol (2011-06-01 13:04:41)
Offline
Help alot. Thank you.
"See, you not only have to be a good coder to create a system like Linux, you have to be a sneaky bastard too." - Linus Torvalds
Offline
First of all I would like at installation script at least 2 multichoice option Gnome newbi, KDE newbi and K+G newbi, where with a click I would have a "normal installation" from where I can install further packages.
My installation had no pacman, startx did not work, and kdm did, I can enter at KDE and Gnome, with no pacman, and no sudo but ...
I was able to use su. Then I had to reconfigure the script, and as package numbers where obsolete figure what are the actual numbers,
Today the script that worked for me was this - it is at the end -
But as I am not good at script language - enough to read and understand - it would be better if it would use * instead of numbers for packages, I did something like that in a pedestrian way, with * and 1 to one to retrieve the actual versions to finally rewrite the script. But anyone with script language knowledge would improve this method.
#!/bin/bash
arch=x86_64
mirror=ftp://mirror.archlinux.no/
# link to cache (or download) and extract: openssl,libarchive,libfetch,pacman
cd /tmp
for pkg in openssl-1.0.0.e-1 libarchive-2.8.5-1 libfetch-2.33-3 pacman-3.5.4-4; do
pkgname=${pkg}-${arch}.pkg.tar.gz
if [[ -e /var/cache/pacman/pkg/${pkgname} ]]; then
ln -sf /var/cache/pacman/pkg/${pkgname} .
else
wget ${mirror}/core/os/${arch}/${pkgname} || exit 1
fi
tar -xvpf ${pkgname} -C / --exclude .PKGINFO --exclude .INSTALL || exit 1
done
# now reinstall using pacman to update the local pacman db
pacman -Sf openssl libarchive libfetch pacman || exit 1
# now update your system
pacman -Syu
Last edited by mitcoes (2011-09-26 08:22:42)
Offline
I do not understand how to run this as a script. I am comfortable with the command line.
So how do I run this as a script?
Thanks!
Offline
I do not understand how to run this as a script. I am comfortable with the command line.
So how do I run this as a script?
Thanks!
You save a script to a file, make i executable and run it. Let's say you named the file 'foo':
[karol@black ~]$ chmod +x foo
[karol@black ~]$ ./foo
Offline
i have the same problem ;(
Offline
i have the same problem ;(
And what problem is that?
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
Seems to be fetching all files, but then i get;
pacman: error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory
#!/bin/bash
arch=`uname -m`
mirror=ftp://mirror.archlinux.no/
# link to cache (or download) and extract: openssl,libarchive,libfetch,pacman
cd /tmp
for pkg in openssl-1.0.0.e-1 libarchive-2.8.5-2 libfetch-2.33-3 pacman-3.5.4-4; do
pkgname=${pkg}-${arch}.pkg.tar.gz
if [[ -e /var/cache/pacman/pkg/${pkgname} ]]; then
ln -sf /var/cache/pacman/pkg/${pkgname} .
else
wget -c ${mirror}/core/os/${arch}/${pkgname} || exit 1
fi
tar -xvpzf ${pkgname} -C / --exclude .PKGINFO --exclude .INSTALL || exit 1
done
# now reinstall using pacman to update the local pacman db
pacman -Sf openssl libarchive libfetch pacman || exit 1
# now update your system
pacman -Syu
Last edited by WoC (2011-12-09 06:39:26)
Offline
Edit: my response was to a post that was later edited beyond recognition, so disregard.
Last edited by /dev/zero (2011-12-09 06:43:20)
Offline
Check www.archlinux.org to find out what the latest version number is.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline