3

I'm trying to install devstack under Ubuntu 12.04 using stack.sh, but I've got stuck at this error. Current python version is 2.7.3

Followed standard method of devstack installation procedure (all-in-one single machine) starting from sudo apt-get update. Let me know if further information is needed.

Reading state information... Done
libvirt-bin is already the newest version.
libvirt-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 213 not upgraded.
+ real_install_package libvirt-bin libvirt-dev
+ is_ubuntu
+ [[ -z deb ]]
+ '[' deb = deb ']'
+ apt_get install libvirt-bin libvirt-dev
++ set +o
++ grep xtrace
+ local 'xtrace=set -o xtrace'
+ set +o xtrace
+ sudo DEBIAN_FRONTEND=noninteractive http_proxy= https_proxy= no_proxy= apt-get --option Dpkg::Options::=--force-confold --assume-yes install libvirt-bin libvirt-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libvirt-bin is already the newest version.
libvirt-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 213 not upgraded.
+ pip_install_gr libvirt-python
+ local name=libvirt-python
++ get_from_global_requirements libvirt-python
++ local package=libvirt-python
+++ grep -i -h '^libvirt-python' /opt/stack/requirements/global-requirements.txt
+++ cut -d# -f1
++ local 'required_pkg=libvirt-python>=1.2.5                   '
++ [[ libvirt-python>=1.2.5                    == '' ]]
++ echo 'libvirt-python>=1.2.5'
+ local 'clean_name=libvirt-python>=1.2.5'
+ pip_install 'libvirt-python>=1.2.5'
++ set +o
++ grep xtrace
+ local 'xtrace=set -o xtrace'
+ set +o xtrace
+ sudo -H http_proxy= https_proxy= no_proxy= PIP_FIND_LINKS=file:///opt/stack/.wheelhouse /usr/local/bin/pip install 'libvirt-python>=1.2.5'
Collecting libvirt-python>=1.2.5
  Using cached libvirt-python-1.2.16.tar.gz
Building wheels for collected packages: libvirt-python
  Running setup.py bdist_wheel for libvirt-python
  Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-XwqhSl/libvirt-python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmp2i3WSspip-wheel-:
  running bdist_wheel
  running build
  /usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
  error: command '/usr/bin/pkg-config' failed with exit status 1

  ----------------------------------------
  Failed building wheel for libvirt-python
Failed to build libvirt-python
Installing collected packages: libvirt-python
  Running setup.py install for libvirt-python
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-XwqhSl/libvirt-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_Rbsrk-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    /usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
    error: command '/usr/bin/pkg-config' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-XwqhSl/libvirt-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_Rbsrk-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-XwqhSl/libvirt-python
+ exit_trap
+ local r=1
++ jobs -p
+ jobs=
+ [[ -n '' ]]
+ kill_spinner
+ '[' '!' -z '' ']'
+ [[ 1 -ne 0 ]]
+ echo 'Error on exit'
Error on exit
+ [[ -z /opt/stack/logs ]]
+ /home/test/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2015-06-11-125626.txt for details
+ exit 1
Zanna
  • 70,465
raj
  • 51
  • Solution: update ubuntu 12.04 packages from "trusty", make sure to update libvirt version to be more than 0.9.11. – raj Jul 03 '15 at 09:13

1 Answers1

2

The issue is due to low version of "libvirt". If you update the Ubuntu 12.04 packages from "trusty", the problem will be solved.

By default Ubuntu downloads packages from "precise", but openstack needs some lib files from "trusty", for example this "libvirt". Below steps solved this issue.

sudo -s
apt-get install ubuntu-cloud-keyring
echo "deb http://ubuntu-cloud.archive.canonical.com/ubuntu trusty-updates/juno main" > /etc/apt/sources.list.d/cloudarchive-juno.list
apt-get update
exit

Note: deb http url can be used from any other valid archive of Ubuntu sites.

Make sure to check the libvirt version

$ libvirtd --version
libvirtd (libvirt) 1.2.2

The output should be greater than 0.9.11. The stack.sh stopped due to this check condition, you can find the same in the query.

guntbert
  • 13,134
raj
  • 51