You are not logged in.

#1 2016-04-23 18:29:07

kushal1998
Member
Registered: 2016-04-23
Posts: 8

[SOLVED] Pacman error

Hi, I'm relatively new to arch. I have recently been getting an error when trying to upgrade my system.
Here is the terminal output:

sudo pacman -Syu
[sudo] password for kushal: 
:: Synchronizing package databases...
 core                                                             120.9 KiB  1299K/s 00:00 [####################################################] 100%
 extra                                                           1760.2 KiB  2.13M/s 00:01 [####################################################] 100%
 community                                                          3.4 MiB  2.26M/s 00:02 [####################################################] 100%
 multilib                                                         161.4 KiB  2.25M/s 00:00 [####################################################] 100%
 archlinuxfr is up to date
:: Starting full system upgrade...
warning: package-query: local (1.8-2) is newer than archlinuxfr (1.8-1)
resolving dependencies...
looking for conflicting packages...
warning: could not fully load metadata for package gnome-backgrounds-3.18.0-1
error: failed to prepare transaction (invalid or corrupted package)

I have tried many things, so let me detail that out for you.
I tried yaourt -R gnome-backgrounds and this is what happened:

~ yaourt -R gnome-backgrounds
[sudo] password for kushal: 
warning: could not fully load metadata for package gnome-backgrounds-3.18.0-1
checking dependencies...

Packages (1) gnome-backgrounds-3.18.0-1


:: Do you want to remove these packages? [Y/n] 
:: Processing package changes...
(1/1) removing gnome-backgrounds                                                           [####################################################] 100%
error: could not remove database entry gnome-backgrounds-3.18.0-1
error: 'gnome-backgrounds-3.18.0-1': file list is missing 

I also tried pacman -Scc and this it apparently did not fix anything...

sudo pacman -Scc

Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N] 

Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n] 
removing unused sync repositories...

I tried pacman -U gnome-backgrounds, but it could not find the package...

sudo pacman -U gnome-backgrounds-3.18.0-1
loading packages...
error: 'gnome-backgrounds-3.18.0-1': could not find or read package 

I tried simply updating the package...

yaourt gnome-backgrounds
1 extra/gnome-backgrounds 3.20-1 (gnome) [installed: 3.18.0-1]
    Background images and data for GNOME
==> Enter n° of packages to be installed (ex: 1 2 3 or 1-3)
==> -------------------------------------------------------
==> 1

resolving dependencies...
looking for conflicting packages...
warning: could not fully load metadata for package gnome-backgrounds-3.18.0-1
error: failed to prepare transaction (invalid or corrupted package)

I also tried doing a forced upgrade, but I understand that using force is frowned upon. Also, I updated package query, but I have had no luck...

If anyone can find a solution to this issue, I would be really grateful.
Thank you.

Last edited by kushal1998 (2016-04-25 03:05:52)

Offline

#2 2016-04-23 19:11:57

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [SOLVED] Pacman error

Please use [code] tags in the future for command output.

Remove gnome-backgrounds from the cache directory (/var/cache/pacman/pkg) and then try forcing a database refresh with "pacman -Syyu". If that doesn't work, switch to a different mirror and try again.

Incidentally, "pacman -U" expects the path to the package, not just the name.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2016-04-23 19:12:11

include4eto
Member
Registered: 2014-05-09
Posts: 4

Re: [SOLVED] Pacman error

Welcome to the forums. Please use

 [­code][­/code] 

blocks to paste output in the future.

Fristly, try doing what the wiki says: pacman wiki

# find /var/cache/pacman/pkg/ -iname "*.part" -exec rm {} \;

If that doesn't fix it, can you try doing

sudo pacman -Rns gnome-backgrounds

?

You don't generally need to use yaourt for that and I'd advise against using it completely, If you dare read Arch's Build System.
But that's a bit off-topic.

Aaand it seems like something's gone wrong with either gnome-backgrounds or package query.
Can you paste the output of this as well

sudo pacman -Qs gnome-backgrounds
sudo pacman -Qs package-query

Btw,  -U installs local packages (i.e. ones you have in your pwd).

Offline

#4 2016-04-23 19:33:00

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 354

Re: [SOLVED] Pacman error

kushal1998 wrote:

Hi, I'm relatively new to arch. I have recently been getting an error when trying to upgrade my system.

sudo pacman -Syu
warning: package-query: local (1.8-2) is newer than archlinuxfr (1.8-1)
warning: could not fully load metadata for package gnome-backgrounds-3.18.0-1
error: failed to prepare transaction (invalid or corrupted package)

The archlinuxfr repository is generally known to cause problems. You should probably begin by removing that and then trying to update. How is package-query (from archlinux-fr) newer than the version in the repo? Did you manually download it from the AUR and use makepkg to update it?
# nano /etc/pacman.conf
# pacman -Syyu

I have tried many things, so let me detail that out for you.
I tried yaourt -R gnome-backgrounds and this is what happened:

The package gnome backgrounds is a regular Arch package in [extra] not in the AUR, you should be managing it with pacman not yaourt. If you need to try and remove it before updating the system.. take note of what you remove if you wish to install it again after the update.
# pacman -Rnu gnome-backgrounds
# pacman -Syyu

I tried pacman -U gnome-backgrounds, but it could not find the package...
sudo pacman -U gnome-backgrounds-3.18.0-1

This command is used to install or update packages which you have built yourself manually or when using a local copy to change package version. You might have wished to try this with a version from your /var/cache/pacman/pkg before clearing it with pacman -Scc. Clearing the whole cache is usually not necessary. You may simply remove an offending package from the directory manually or via commend. Yaourt again, is only "needed" when dealing with packages from the AUR which gnome-backgrounds is not.

*** Please use code blocks and better formatting for readability in the future
*** Read the wiki
*** Good luck

I was apparently way too slow in reading this post and trying to provide answers smile

Last edited by TheChickenMan (2016-04-23 19:35:22)


If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

#5 2016-04-23 20:03:12

kushal1998
Member
Registered: 2016-04-23
Posts: 8

Re: [SOLVED] Pacman error

include4eto wrote:

Welcome to the forums. Please use

 [­code][­/code] 

blocks to paste output in the future.

Fristly, try doing what the wiki says: pacman wiki

# find /var/cache/pacman/pkg/ -iname "*.part" -exec rm {} \;

If that doesn't fix it, can you try doing

sudo pacman -Rns gnome-backgrounds

?

You don't generally need to use yaourt for that and I'd advise against using it completely, If you dare read Arch's Build System.
But that's a bit off-topic.

Aaand it seems like something's gone wrong with either gnome-backgrounds or package query.
Can you paste the output of this as well

sudo pacman -Qs gnome-backgrounds
sudo pacman -Qs package-query

Btw,  -U installs local packages (i.e. ones you have in your pwd).

Thanks for informing me on the code blocks!
Also, these methods did not work.

 sudo pacman -Rns gnome-backgrounds
warning: could not fully load metadata for package gnome-backgrounds-3.18.0-1
checking dependencies...

Packages (1) gnome-backgrounds-3.18.0-1


:: Do you want to remove these packages? [Y/n] 
:: Processing package changes...
(1/1) removing gnome-backgrounds                                                           [####################################################] 100%
error: could not remove database entry gnome-backgrounds-3.18.0-1 

also here are the outputs

 sudo pacman -Qs gnome-backgrounds
local/gnome-backgrounds 3.18.0-1 

    and

 sudo pacman -Qs package-query    
local/package-query 1.8-2
    Query ALPM and AUR 

Offline

#6 2016-04-23 20:12:08

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

Re: [SOLVED] Pacman error

kushal1998 wrote:

Hi, I'm relatively new to arch.

...
archlinuxfr is up to date

I don't know if it is the cause of the current problem, but these two should absolutely never go together.  Period.  This will cause many other problems.  Really no one should use archlinuxfr.  It is perpetually broken, and it's maintainers encourage habbits that will break your system.

If you are new to arch, you also shouldn't be using yaourt (yet).  This will also be a significant source of issues if you don't know how the AUR works.  Yaourt, however - unlike archlinuxfr - can be used responsibly by users who know how it works and how to fix it when it breaks - though such users who still opt to use it are exceedingly rare.


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

Offline

#7 2016-04-23 20:43:02

kushal1998
Member
Registered: 2016-04-23
Posts: 8

Re: [SOLVED] Pacman error

Xyne wrote:

Please use [code] tags in the future for command output.

Remove gnome-backgrounds from the cache directory (/var/cache/pacman/pkg) and then try forcing a database refresh with "pacman -Syyu". If that doesn't work, switch to a different mirror and try again.

Incidentally, "pacman -U" expects the path to the package, not just the name.

The package doesn't seem to be in the cache.

cd /var/cache/pacman/pkg
➜  pkg ls
flashplugin-11.2.202.616-1-x86_64.pkg.tar.xz  package-query-1.8-1-x86_64.pkg.tar.xz  pacman-mirrorlist-20160422-1-any.pkg.tar.xz
➜  pkg 

I tried updating my mirror, but I'm unaware if the change worked or not. The problem with gnome-backgrounds is still unresolved.
I also downgraded package-query and that does not seem to change anything.

sudo pacman -Syyu
:: Synchronizing package databases...
 core                                                             120.9 KiB  1343K/s 00:00 [####################################################] 100%
 extra                                                           1759.5 KiB  2.27M/s 00:01 [####################################################] 100%
 community                                                          3.4 MiB  2.29M/s 00:01 [####################################################] 100%
 multilib                                                         161.4 KiB  2.13M/s 00:00 [####################################################] 100%
 archlinuxfr                                                       11.3 KiB  2.77M/s 00:00 [####################################################] 100%
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
warning: could not fully load metadata for package gnome-backgrounds-3.18.0-1
error: failed to prepare transaction (invalid or corrupted package)

The error ends the process before the upgrade can proceed, but the mirror has no errors before that.
Am I missing something?

Offline

#8 2016-04-23 21:40:33

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [SOLVED] Pacman error

package-query has nothing to do with this. It is only needed for yaourt.

How did you "update" your mirror? Did you switch to a different mirror in /etc/pacman.d/mirrorlist? If so then you have changed your mirror.

Re-reading your output, I realize now that the local package metadata appears to be corrupted. Try removing the package before upgrading:

pacman -R gnome-backgrounds
pacman -Syu gnome-backgrounds

Before you do that, back up the apparently corrupted data in the local database by copying /var/lib/pacman/local/gnome-backgrounds* to another directory.

edit
This should never happen btw. Did you abort a previous pacman operation during installation? If you can't think of anything that you've done that might have corrupted the data (if the data was corrupted), then I would recommend running checks to make sure that there's nothing wrong with the disk.

Last edited by Xyne (2016-04-23 21:43:43)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#9 2016-04-23 22:12:46

kushal1998
Member
Registered: 2016-04-23
Posts: 8

Re: [SOLVED] Pacman error

Xyne wrote:

package-query has nothing to do with this. It is only needed for yaourt.

How did you "update" your mirror? Did you switch to a different mirror in /etc/pacman.d/mirrorlist? If so then you have changed your mirror.

Re-reading your output, I realize now that the local package metadata appears to be corrupted. Try removing the package before upgrading:

pacman -R gnome-backgrounds
pacman -Syu gnome-backgrounds

Before you do that, back up the apparently corrupted data in the local database by copying /var/lib/pacman/local/gnome-backgrounds* to another directory.

edit
This should never happen btw. Did you abort a previous pacman operation during installation? If you can't think of anything that you've done that might have corrupted the data (if the data was corrupted), then I would recommend running checks to make sure that there's nothing wrong with the disk.

Nothing went wrong during installation and I have been able to upgrade successfully for the past couple of months without any issues.
Here is how I updated my mirror:

 mv /etc/pacman.d/mirrorlist_new /etc/pacman.d/mirrorlist 

Deleting gnome-backgrounds doesn't work. This is my main issue. How would I check disk damage? ...and how would I be able to fix? Is it better to just reinstall arch?

 sudo pacman -R gnome-backgrounds                            
warning: could not fully load metadata for package gnome-backgrounds-3.18.0-1
checking dependencies...

Packages (1) gnome-backgrounds-3.18.0-1


:: Do you want to remove these packages? [Y/n] 
:: Processing package changes...
(1/1) removing gnome-backgrounds                                                           [####################################################] 100%
error: could not remove database entry gnome-backgrounds-3.18.0-1

Offline

#10 2016-04-23 22:45:20

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

Re: [SOLVED] Pacman error

What's in /var/lib/pacman/local/gnome-backgrounds-3.18.0-1/?

Offline

#11 2016-04-24 00:52:38

kushal1998
Member
Registered: 2016-04-23
Posts: 8

Re: [SOLVED] Pacman error

Scimmia wrote:

What's in /var/lib/pacman/local/gnome-backgrounds-3.18.0-1/?

 cd /var/lib/pacman/local/gnome-backgrounds-3.18.0-1/ 
➜  gnome-backgrounds-3.18.0-1 ls
desc

I'm not familiar with what is supposed to be here. Can I recreate any files that are needed?

Offline

#12 2016-04-24 02:31:50

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

Re: [SOLVED] Pacman error

You can, but with the filelist totally gone, it would likely be easier to just delete the gnome-backgrounds-3.18.0-1 dir and reinstall the package with --force.

Offline

#13 2016-04-25 00:49:16

kushal1998
Member
Registered: 2016-04-23
Posts: 8

Re: [SOLVED] Pacman error

Scimmia wrote:

You can, but with the filelist totally gone, it would likely be easier to just delete the gnome-backgrounds-3.18.0-1 dir and reinstall the package with --force.

so this does not work:

 find . -type d -name gnome-backgrounds\* -exec rm {} \; 

and I can't find or delete the directory...

Where can I find the filelist I need to recreate?

EDIT:
I deleted the directory. Now when forcing an upgrade I get errors from duplicate files. This shouldn't happen, right?

Last edited by kushal1998 (2016-04-25 00:58:45)

Offline

#14 2016-04-25 01:27:20

kushal1998
Member
Registered: 2016-04-23
Posts: 8

Re: [SOLVED] Pacman error

Okay, I have resolved this.

First, remove the directory with

 rm -r /"path to directory" 

Second, update with

 sudo pacman -Syyu 

Third, force re-install with

 sudo pacman -S gnome-backgrounds --force 

Thank you everyone who helped.

Last edited by kushal1998 (2016-04-25 01:28:13)

Offline

#15 2016-04-25 01:32:51

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Pacman error

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#16 2016-04-25 03:06:16

kushal1998
Member
Registered: 2016-04-23
Posts: 8

Re: [SOLVED] Pacman error

jasonwryan wrote:

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.

Thanks!

Offline

Board footer

Powered by FluxBB