Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:


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.

share|improve this question
Post your edit as an answer! :) – iglvzx Jan 19 '12 at 11:00
I would, but I need to wait 7 hours. :) – gaidal Jan 19 '12 at 11:02
up vote 8 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.

share|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 '12 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 '12 at 5:59

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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