Cannot install package python-guestfs

2k views Asked by At

I have ubuntu 11.10 (oneiric) I tried to run a program called snf-image-creator (it is for creating virtual machines) and I get the error:

File "/usr/local/bin/snf-image-creator", line 9, in <module>
load_entry_point('snf-image-creator==0.5.1', 'console_scripts', 'snf-image-creator')()
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 351, in load_entry_point
def get_resource_filename(manager, resource_name):
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2363, in load_entry_point
def clone(self,**kw):
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2088, in load

File "/usr/local/lib/python2.7/dist-packages/snf_image_creator-0.5.1-py2.7.egg/image_creator/main.py", line 42, in <module>
  from image_creator.disk import Disk
File "/usr/local/lib/python2.7/dist-packages/snf_image_creator-0.5.1-py2.7.egg/image_creator/disk.py", line 43, in <module>
from image_creator.image import Image
File "/usr/local/lib/python2.7/dist-packages/snf_image_creator-0.5.1-py2.7.egg/image_creator/image.py", line 41, in <module>
import guestfs

ImportError: No module named guestfs

So I tried to install guestfs. I used apt-get install python-guestfs but I get message :

E: Unable to locate package python-guestfs

I also tied with apt-get install guestfs or libguestfs, python-libguestfs. I searched for the package in http://packages.ubuntu.com/ and there are results. I also used command

sudo apt-file find guestfs 

but it didn't returned anything. Also command

 aptitude install libguestfs 
 aptitude install guestfs

and also because oneiric is not supported anymore I changed in /etc/apts/sources.list the links to:

 http://old-releases.ubuntu.com/ubuntu/

and then I did

apt-get update
apt-get upgrade

I don't know what else to do.

2

There are 2 answers

1
Chris Montanaro On

11.10 has been unsupported for nearly a year now. You can try a source install, the instructions are in the project readme:

https://github.com/libguestfs/libguestfs

4
Mike Driscoll On

If you have guestfs itself installed, then you should be able to download the Python source from github:

Then you can just do a Python source install. Something like this is usually all it takes:

python setup.py install

You may have to prepend that with sudo.