Tuesday, November 01, 2011

[hiwmcmir] /usr/lib/ghc/package.conf.d/package.cache: openBinaryFile: does not exist (No such file or directory)

After the Debian Testing (unattended) upgrade ghc haskell: (dpkg.log):

2011-10-30 00:47:43 upgrade ghc6 7.0.4-6 7.0.4-7

I encountered:

/usr/lib/ghc/package.conf.d/package.cache: openBinaryFile: does not exist (No such file or directory)

The solution was

sudo ghc-pkg recache

This might be a side effect of unattended-upgrades getting confused trying to upgrade itself while it is performing an upgrade:

WARNING - Unattended-upgrade in progress during shutdown, sleeping for 5s
WARNING - Giving up on lockfile after 10 delay
invoke-rc.d: initscript unattended-upgrades, action "start" failed.
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1

UPDATE: Yes, the ultimate solution to the problem was to get apt and dpkg unwedged with a aptitude update && aptitude full-upgrade. There were many yet-unconfigured packages.

3 comments :

Alistra said...

Sometimes i get this error due to umask 077 on root, then i just chmod 644 the file and it works.

Anonymous said...

thanks!

Unknown said...

This helped a ton, thank you!