libvirt-python parou a instalação do devstack usando o stack.sh no Ubuntu 12.04

3

Estou tentando instalar o devstack no Ubuntu 12.04 usando stack.sh , mas fiquei preso nesse erro. A versão atual do python é 2.7.3

Método padrão seguido do procedimento de instalação do devstack (all-in-one single machine) a partir de sudo apt-get update . Deixe-me saber se mais informações são necessárias.

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
    
por raj 11.06.2015 / 16:11

1 resposta

2

O problema é devido à baixa versão do "libvirt". Se você atualizar os pacotes do Ubuntu 12.04 de "fiel", o problema será resolvido.

Por padrão, o Ubuntu faz downloads de pacotes "precisos", mas o openstack precisa de alguns arquivos lib de "confiáveis", por exemplo, este "libvirt". Abaixo dos passos resolveu este problema.

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

Nota: deb http url pode ser usado de qualquer outro arquivo válido de sites do Ubuntu.

Certifique-se de verificar a versão do libvirt

$ libvirtd --version
libvirtd (libvirt) 1.2.2

A saída deve ser maior que 0.9.11 . O stack.sh parou devido a essa condição de verificação, você pode encontrar o mesmo na consulta.

    
por raj 03.07.2015 / 11:30

Tags