After removing yaourt and package-query, upgrading pacman to v4.0.1 and reinstalling the latest package-query and yaourt from AUR, I can't use yaourt anymore. It tells me:

Unable to open file: /usr/local/etc/pacman.conf

I don't understand why it's looking there now and not in /etc. Meanwhile pacman is working normally. If I create a symlink to pacman.conf, I get the following error instead:

failed to initialize alpm library (could not find or read directory)

My $PATH is:

/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/vendor_perl:/usr/bin/core_perl

I have tried looking in the yaourt PKGBUILD prior to installing, reinstalling it, looking in the yaourt script file, and I can't find anything suspicious. Not sure what to look for, what could have happened?

EDIT: Found the solution: /usr/bin needs to be before /usr/local/bin in $PATH.

link|improve this question
Post your edit as an answer! :) – iglvzx Jan 19 at 11:00
1  
I would, but I need to wait 7 hours. :) – gaidal Jan 19 at 11:02
feedback

2 Answers

up vote 1 down vote accepted

Yaourt apparently uses the first entry in $PATH, so /usr/bin needs to be before /usr/local/bin there.

Changing this in /etc/profile solved the problem.

link|improve this answer
Programs always use the first entry in $PATH. The real problem seems to be that you have yaourt installed twice, in /usr and /usr/local. – grawity Jan 22 at 16:19
That's good to know! How can you tell that it is installed twice? I removed it with pacman -Rs before installing the new version. – gaidal Jan 26 at 5:59
feedback

Reinstall package-query using empty --prefix ./configure --prefix=

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.