You are not logged in.

#1 2009-11-08 07:39:12

ImaNoobus
Member
From: Tucson, Arizona
Registered: 2009-11-07
Posts: 3

[SOLVED] Pacman -Sy python "Database path is undefined"

Background info: Arch Linux 64 on Macbook Pro 2,2 via VMware Fusion 2.0

Summary:
I have worked through the Beginner's Guide up to the point where I'm supposed to install python for the rankmirrors script.

pacman -Sy python

results in:

error: database path is undefined
error: could not register 'core' database (could not open database)

I tinkered with /etc/pacman.conf to change dbpath to various guesses. Results:

error: problem setting dbpath '/var/lib/pacman/' (could not find or read directory)
error: problem setting dbpath '/sda2/var/lib/pacman/' (could not find or read directory)
error: problem setting dbpath '/dev/sda2/var/lib/pacman/' (could not find or read directory)

I'm not sure where this is coming from, but I've tried multiple avenues without success. Any ideas? Am I on the right track?

Detailed:

Rustyhann had a problemhttp://bbs.archlinux.org/viewtopic.php?id=72338 involving the same error message. Post #2 looked promising:

wonder wrote:

take a look at /etc/pacman.d/mirrorlist and see if is a mirror uncommented and do pacman -Syyu. if this don't solve the problem, you can post the output of
pacman -Syuv
where -v is verbose

So I uncommented the US mirrors in /etc/pacman.d/mirrorlist (which were all commented) and tried the rest. No change.

Following the beginner's guide, I created /var in a separate partition.
Stemming from another similar error message http://bbs.archlinux.org/viewtopic.php?id=63578 was a suggestion:

ibendiben wrote:

Or you have your database in an irregular place and you need to define that place in pacman.conf

My /etc/pacman.conf var Directories appear as follows:
#DBPath      =/var/lib/pacman/
#CacheDir    =/var/cache/pacman/pkg/
#LogFile     =/var/log/pacman.log
Is this how a separate /var partition should be set up?
I tried adding =/dev/sda2/var/... and =/sda2/var/... but that didn't work.
If this is along the right train of thought, how would I specify the correct partition?

Last edited by ImaNoobus (2009-11-08 20:32:07)

Offline

#2 2009-11-08 08:17:10

benob
Member
Registered: 2008-11-11
Posts: 187

Re: [SOLVED] Pacman -Sy python "Database path is undefined"

Creating a separate partition may not solve your problem. Do the directories being referred to exist? Do they have the right permissions? If not, it may be that something went wrong during the installation. I guess that python is not the offending package, you probably can't install anything.

If the directories are not there, you could do as root:

mkdir -p /var/lib/pacman/ /var/cache/pacman/pkg/ /var/log/
chmod 755 /var/lib/pacman/ /var/cache/pacman/pkg/ /var/log/
chown root.root /var/lib/pacman/ /var/cache/pacman/pkg/ /var/log/

and try pacman -Syu just to see if removed the error.

Offline

#3 2009-11-08 09:47:46

ImaNoobus
Member
From: Tucson, Arizona
Registered: 2009-11-07
Posts: 3

Re: [SOLVED] Pacman -Sy python "Database path is undefined"

Thanks benob, this gets it working*. For the sake of optimization, how could I get Pacman to work with the reiserFS partition I intended for /var, though?

*I think its working, but the behavior's a little funky. Is this normal?

# pacman -Syu
: : Synchronizing package databases. . .
error: failed retrieving file 'core.db.tar.gz' from mirror.archlinux.com.ve : No address record
 core is up to date
error: failed retrieving file 'extra.db.tar.gz' from mirror.archlinux.com.ve : No address record
 extra is up to date
error: failed retrieving file 'community.db.tar.gz' from mirror.archlinux.com.ve : No address record
 community is up to date
: : Starting full system upgrade. . .
 local database is up to date

Offline

#4 2009-11-08 15:10:27

benob
Member
Registered: 2008-11-11
Posts: 187

Re: [SOLVED] Pacman -Sy python "Database path is undefined"

The host mirror.archlinux.com.ve does not seem to work. Can you ping it? I can't. Maybe you should try another mirror, like archlinux.unixheads.org (just put it first in the list).

As for the /var partition, make sure it gets mounted at boot time. It should be in /etc/fstab
/dev/sda2 /var ext3 defaults 0 1
(ext3 or whatever file system you formated it to)

to see if it's mounted, type mount and you should get, among other things:
/dev/sda2 on /var type ext3 (rw)

and make sure the directories are there, too.

Offline

#5 2009-11-08 15:11:08

qb1base
Member
Registered: 2009-07-30
Posts: 15

Re: [SOLVED] Pacman -Sy python "Database path is undefined"

That's definitely not normal, it doesn't look like you're networking is working. Just a FYI, don't ever do a pacman -Sy (single package), it's a surefire way to FUBAR your system, just do pacman -Syu.

Offline

#6 2009-11-08 17:40:30

ImaNoobus
Member
From: Tucson, Arizona
Registered: 2009-11-07
Posts: 3

Re: [SOLVED] Pacman -Sy python "Database path is undefined"

Awesome! Thank you very much benob for all your help!
I was missing '/' before var in /etc/fstab.
That other mirror did the trick.
I now better understand use of the mirrorlist and the purpose of mounting.
big_smile

Offline

Board footer

Powered by FluxBB