Ask Your Question

apt-get install keystone errors out

asked 2012-05-14 23:47:29 -0500

neil-orbitalsoftware gravatar image

Hi I am following the Ubuntu quick start to test out the Essex release -

I am installing on physical hardware on Ubuntu 12.04 , I previously had a working devstack and removed it to focus on the above install guide.

The keystone install seems to want to error out as below: ( What migh the 2012.1 vs 2012.2 indicate? ) I have run both apt-get update and upgrade ... I get this output on other apt-get calls too which is strange and indicates some failed processing state of apt-get itself.

Here is the command and trace:

root@cloud1:~# apt-get install keystone Reading package lists... Done Building dependency tree Reading state information... Done keystone is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? Y Setting up keystone (2012.1-0ubuntu1) ... Traceback (most recent call last): File "/usr/local/bin/keystone-manage", line 4, in <module> from pkg_resources import require; require('keystone==2012.2') File "/usr/lib/python2.7/dist-packages/", line 2711, in <module> parse_requirements(__requires__), Environment() File "/usr/lib/python2.7/dist-packages/", line 584, in resolve raise DistributionNotFound(req) pkg_resources.DistributionNotFound: keystone==2012.2 dpkg: error processing keystone (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: keystone E: Sub-process /usr/bin/dpkg returned an error code (1)

edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted

answered 2012-05-15 23:13:06 -0500

koolhead17 gravatar image

try sudo apt-get remove --purge keystone

and then

sudo apt-get update sudo apt-get upgrade sudo apt-get install keystone

edit flag offensive delete link more

answered 2012-05-16 01:04:43 -0500

neil-orbitalsoftware gravatar image

No go. Tried it , removal seemed to work better but the install failed just the same.

Can anyone comment on the 2012.2 vs 2012.1 reference and if a seperate PPA needs to be added? (or maybe removed if the devstack scripts had done something? )

Link of interest: (

edit flag offensive delete link more

answered 2012-05-16 01:21:53 -0500

neil-orbitalsoftware gravatar image

OK I fixed it.

If anyone else runs into this, after removing what you think is everything devstack installs there is one final step...

Note the error above : File "/usr/local/bin/keystone-manage" ... this implies a reference.

devstack copies from its bin install dirs to the usr/bin so make sure to delete all of those...

and you should be rewarded with a keystone start/running, process 9574



edit flag offensive delete link more

answered 2013-01-22 06:40:02 -0500

Thanks Neil!

edit flag offensive delete link more

answered 2013-03-01 17:00:12 -0500

I had the same problem and also found that if the /var/lib/keystone/keystone.db is not removed, the re-install will fail.

If /etc/keystone is not present but /var/lib/keystone/keystone.db IS present (from a previous attempt), the postinstall will fail.

This is likely because the keystone package install scripts do not do a good enough job in verifying that all of the configs are in place and are easily fooled by leftovers from a previous installation that wasn't completely removed.

I finally had success when I removed everything from /etc/keystone and /var/lib/keystone, only then was I able to re-install it successfully.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2012-05-14 23:47:29 -0500

Seen: 458 times

Last updated: Mar 01 '13