You are not logged in.

#1 2012-02-19 15:17:15

debazthed
Member
Registered: 2012-01-05
Posts: 24

What to do when a package can't be found due to out-of-date pacman DBs

Hello everyone,

I am fairly new to arch and have now run into the following problem a couple of times:

I try to install something using pacman -S <package> and get an error message like this:

error: failed retrieving file '<filename>' from <hostname> : Given file does not exist

... for all the mirrors in my list.

Now i realize that this is due to my local database no longer being in sync with the repositories database. However I wonder what the proper way to fix this issue is, because I remember reading somewhere that syncing the DB first by doing

pacman -Sy <packagename> 

is unsafe. Or is that incorrect?


Kind regards
DeBazthed

Offline

#2 2012-02-19 15:23:02

Lennie
Member
From: Sweden
Registered: 2011-10-12
Posts: 146

Re: What to do when a package can't be found due to out-of-date pacman DBs

pacman -Syu

Always install all updates when syncing the db.

Offline

#3 2012-02-19 16:08:39

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: What to do when a package can't be found due to out-of-date pacman DBs

Always use pacman -Syu, and make sure your mirror is up to date. http://www.archlinux.org/mirrors/status/


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#4 2012-02-19 16:25:48

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: What to do when a package can't be found due to out-of-date pacman DBs


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#5 2012-02-19 17:23:27

debazthed
Member
Registered: 2012-01-05
Posts: 24

Re: What to do when a package can't be found due to out-of-date pacman DBs

Thanks for the advice, guys!

But does that mean I always need to run a full system upgrade in that case?

Offline

#6 2012-02-19 17:31:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: What to do when a package can't be found due to out-of-date pacman DBs

debazthed wrote:

But does that mean I always need to run a full system upgrade in that case?

Yes.
If you want to install a new package 'foo', run 'pacman -Syu foo'.

Offline

#7 2012-02-19 18:18:27

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: What to do when a package can't be found due to out-of-date pacman DBs

debazthed wrote:

Thanks for the advice, guys!

But does that mean I always need to run a full system upgrade in that case?

Partial upgrades does not work on binary based rolling release distributions due to .soname bumps, api/abi changes etc.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#8 2012-02-19 18:29:00

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: What to do when a package can't be found due to out-of-date pacman DBs

That means updating a package without updating the system works, as long as you make sure the dependecies are updated as well (if needed), but I'd recommend updating the system regularly and especially before installing a package to minimize the risk of breaking anything.

Offline

#9 2012-02-19 18:36:43

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: What to do when a package can't be found due to out-of-date pacman DBs

There has been recently a thread on the ML where one user didn't want to fully update his system (because he needed to be sure everything will work and updates may fsck something up), just to install a new package:
http://mailman.archlinux.org/pipermail/ … 25118.html

karol wrote:

pacman checks dependencies, soemtimes they are versioned but in most cases they're not.

http://mailman.archlinux.org/pipermail/ … 25127.html

ngoonee wrote:

(...) without versions deps (rarely used due to maintenance headaches) updating your database with -Sy without running a full update is not supported. pacman cannot handle that, period.

The correct way to  install packages on an out-of-date system is to NOT update your database. You may need an out-of-date mirror or to manually download from mirror archives.

Offline

Board footer

Powered by FluxBB