You are not logged in.
Something went wrong in my daily pacman -Suy. Suddenly lost pacman command after this, during the upgrade process.
error: could not open file /var/cache/pacman/pkg/pacman-5.0.2-2-x86_64.pkg.tar.xz: No such file or directory
error: could not commit transaction
error: failed to commit transaction (transaction aborted)
So i just tried to follow something like this: https://bbs.archlinux.org/viewtopic.php?id=95007
It didn't work.
Cleaned my /var/cache/pacman, then I manually downloaded pacman from my local mirror and did this:
sudo tar -xvpf pacman-5.0.2-2-x86_64.pkg.tar.xz -C / --exclude .PKGINFO --exclude .INSTALL
Now I have my pacman command again available, but now I have this all over the place:
error: could not open file /var/lib/pacman/local/pacman-5.0.2-2/desc: No such file or directory
So I just tried to force pacman reinstall:
$: sudo pacman -S --force pacman
warning: pacman-5.0.2-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
error: could not open file /var/lib/pacman/local/pacman-5.0.2-2/desc: No such file or directory
warning: could not fully load metadata for package pacman-5.0.2-2
error: failed to prepare transaction (invalid or corrupted package)
Already tried wild things like `pacman -Syyccu` [error: can't use clean and refresh at same time] and `pacman -Suu` [nothing to do].
This pacman seems to work fine, I just made a pacman -Syu, with that 'could no open .../pacman.../desc' repeated a lot of times, but it worked fine, except I cant upgrade my pacman in the future?
Any ideas to help recover my beloved system? Thanks!
Last edited by rddweb (2017-07-14 08:36:13)
Offline
That thread is very old and there are better ways to deal with breakages.
Just checking the pacman page on wiki would have pointed you to several solutions.
Next time you got problems search wiki before forum please.
You need to boot into a reliable system to execute repairs.
prepare latest archlinux install media, boot it and follow https://wiki.archlinux.org/index.php/Pa … an_upgrade
Last edited by Lone_Wolf (2017-07-14 11:19:03)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
@Lone_Wolf including step 3 which mounts the root filesystem two additional times at /mnt/proc and /mnt/sys?
Offline
Yes. But it's not mounting the root filesystem, it's mounting /proc and /sys in the chroot target.
Last edited by Slithery (2017-07-14 11:37:38)
Offline
Then why use the parameter /dev/sdaX instead of none or rebind as per Change_root?
Edit:
Spelling
Last edited by loqs (2017-07-14 11:55:56)
Offline
That thread is very old and there are better ways to deal with breakages.
Just checking the pacman page on wiki would have pointed you to several solutions.
Next time you got problems search wiki before forum please.You need to boot into a reliable system to execute repairs.
prepare latest archlinux install media, boot it and follow https://wiki.archlinux.org/index.php/Pa … an_upgrade
Sorry. I read that before. The 'several' solutions like that https://wiki.archlinux.org/index.php/Pa … ing_pacman, is just the same I did, so , it didn't worked.
Just thought that booting live media to solve something 'simple' like that is kinda lame. That must be a easier way to solve something recurrent with Arch (broken packages).
I'm long time arch user (and much more linux user), and in the past, problems like that were more easily solved. Pacman changed that hard and I didn't saw?
Anyway, just copied the missing files from my VPS that also uses archlinux.
It must be a easier way... must. For now on, since I can't trust pacman to reinstall pacman anymore, I'm moving my /*/pacman/* to a btfrs subvolume and snapshoting everytime before an upgrade.
Thanks all. Solved.
Please, please don't take personally. I read wiki everytime, I have even it cached offline on my smartphone.
Last edited by rddweb (2017-07-14 12:13:19)
Offline
Something went wrong in my daily pacman -Suy. Suddenly lost pacman command after this, during the upgrade process.
error: could not open file /var/cache/pacman/pkg/pacman-5.0.2-2-x86_64.pkg.tar.xz: No such file or directory error: could not commit transaction error: failed to commit transaction (transaction aborted)
What you're saying doesn't make sense -- you seem to be saying that pacman aborted without doing anything, when it successfully found/downloaded /var/cache/pacman/pkg/pacman-5.0.2-2-x86_64.pkg.tar.xz during the download stage, and failed to find it when doing the extraction stage. Either that was a very well-timed `rm` or you have filesystem corruption???
Either way, a "transaction aborted" would not cause pacman to break, because nothing should happen. So there is something you aren't telling us.
So i just tried to follow something like this: https://bbs.archlinux.org/viewtopic.php?id=95007
It didn't work.
Cleaned my /var/cache/pacman, then I manually downloaded pacman from my local mirror and did this:
sudo tar -xvpf pacman-5.0.2-2-x86_64.pkg.tar.xz -C / --exclude .PKGINFO --exclude .INSTALL
Now I have my pacman command again available, but now I have this all over the place:
error: could not open file /var/lib/pacman/local/pacman-5.0.2-2/desc: No such file or directory
So I just tried to force pacman reinstall:
$: sudo pacman -S --force pacman warning: pacman-5.0.2-2 is up to date -- reinstalling resolving dependencies... looking for conflicting packages... error: could not open file /var/lib/pacman/local/pacman-5.0.2-2/desc: No such file or directory warning: could not fully load metadata for package pacman-5.0.2-2 error: failed to prepare transaction (invalid or corrupted package)
Again, the commands you actually listed could not have this effect. pacman is erroring because your local install database is inconsistent -- it claims you have the package installed, but it cannot find the desc file. You could fix that by deleting the /var/lib/pacman/local/pacman-5.0.2-2/ directory and using `pacman -S --dbonly pacman` to repair the database, then cleaning up the potential file mismatches, but that still doesn't explain how it happened in the first place...
Already tried wild things like `pacman -Syyccu` [error: can't use clean and refresh at same time] and `pacman -Suu` [nothing to do].
That's pretty wild alright, where did you get the idea that that might do something?
Like most application, pacman options have defined meanings, you can read about them on the manpage. Which part of their descriptions implied they might help in the event of an "invalid or corrupted package" error?
Last edited by eschwartz (2017-07-14 13:40:20)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
rddweb wrote:Something went wrong in my daily pacman -Suy. Suddenly lost pacman command after this, during the upgrade process.
error: could not open file /var/cache/pacman/pkg/pacman-5.0.2-2-x86_64.pkg.tar.xz: No such file or directory error: could not commit transaction error: failed to commit transaction (transaction aborted)
What you're saying doesn't make sense -- you seem to be saying that pacman aborted without doing anything, when it successfully found/downloaded /var/cache/pacman/pkg/pacman-5.0.2-2-x86_64.pkg.tar.xz during the download stage, and failed to find it when doing the extraction stage. Either that was a very well-timed `rm` or you have filesystem corruption???
Either way, a "transaction aborted" would not cause pacman to break, because nothing should happen. So there is something you aren't telling us.
So i just tried to follow something like this: https://bbs.archlinux.org/viewtopic.php?id=95007
It didn't work.
Cleaned my /var/cache/pacman, then I manually downloaded pacman from my local mirror and did this:
sudo tar -xvpf pacman-5.0.2-2-x86_64.pkg.tar.xz -C / --exclude .PKGINFO --exclude .INSTALL
Now I have my pacman command again available, but now I have this all over the place:
error: could not open file /var/lib/pacman/local/pacman-5.0.2-2/desc: No such file or directory
So I just tried to force pacman reinstall:
$: sudo pacman -S --force pacman warning: pacman-5.0.2-2 is up to date -- reinstalling resolving dependencies... looking for conflicting packages... error: could not open file /var/lib/pacman/local/pacman-5.0.2-2/desc: No such file or directory warning: could not fully load metadata for package pacman-5.0.2-2 error: failed to prepare transaction (invalid or corrupted package)
Again, the commands you actually listed could not have this effect. pacman is erroring because your local install database is inconsistent -- it claims you have the package installed, but it cannot find the desc file. You could fix that by deleting the /var/lib/pacman/local/pacman-5.0.2-2/ directory and using `pacman -S --dbonly pacman` to repair the database, then cleaning up the potential file mismatches, but that still doesn't explain how it happened in the first place...
Already tried wild things like `pacman -Syyccu` [error: can't use clean and refresh at same time] and `pacman -Suu` [nothing to do].
That's pretty wild alright, where did you get the idea that that might do something?
Like most application, pacman options have defined meanings, you can read about them on the manpage. Which part of their descriptions implied they might help in the event of an "invalid or corrupted package" error?
You say me... I have a pretty wild setup on a rolling release distro. (:
I'm using btrfs on a 256GB Samsung 850 EVO for /
I moved things like /var/cache/pacman, and other download, documents, etc to a BTRFS raid 0 on 2x 4TB Hitachi 5400RPM drives.
Also my docker, vagrant machines, mysql, postgres data are running on ext4 on 7200rpm 1TB Seagate.
Rock solid for 4 years (just replaced the SSD by cloning from 128GB Samsung 740 and Raid from 2x 1.5TB Western Digital last year).
I just did what I do every 4 A.M. Wake up, made a coffee while doing `pac` command (that does something like pacman -Suy).
What I didn't had was a proper subvolume backup for pacman caches, since I trusted pacman A LOT on last 7 (SEVEN) years as Arch user issuing simple commands to restore broken packages, etc. So I just used to old pacman behavior. The wiki didn't said about --dbonly, and man pages are useless since 90's [except if you dont have internet].
Don't know what happened. Just asked if someone had simple commands to recover this type of situations, like we ALWAYS had.
It successfully downloaded like 30 packages, installed 20 something and stopped issuing that line. Maybe a BTRFS fault? Hardware fault? Don't know. My hardware health checks indicates nothing, my essential files are just fine (with a proper backup on external drives). Just wanted to recover fast that glitch, like I always did since my first time using arch.
/s Time to move back to gentoo or move forward to freebsd. /s
Or seriously, I will test your command later and maybe write something on wiki? Thanks for the enlightenment about pacman's 5 behavior.
Last edited by rddweb (2017-07-15 22:58:15)
Offline
Did you hit https://bugs.archlinux.org/task/50298 ?
Offline
Yeah, messing with the CacheDir would do that. Use a bind mount or modify pacman.conf's CacheDir setting rather than symlinking it.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline