1

After upgrading from Ubuntu 16.04 LTS to Ubuntu 18.04 LTS, I can no more start Virtual Machine Manager. It was running okay when I was using Ubuntu 16.04 and I didn't face any problems but after the upgrade, everything broke. I even installed Windows 10 on it. Running it from the Applications Launcher just don't show anything. I tried running it from the terminal but I always get this error:

/usr/bin/virt-manager: 3: exec: /usr/share/virt-manager/virt-manager: not found 

I tried several times on the terminal but it always throw that same error message, which I don't seem to understand. I thought KVM wasn't installed but running kvm-ok gives the following message that KVM is installed and acceleration can be used:

% kvm-ok INFO: /dev/kvm exists KVM acceleration can be used 

Also, the Windows 10 image file still exists in /var/lib/libvirt/images, plus other directories in the images parent directory.

How can I do to make Virtual Machine Manager run again.

2
  • 1
    apt install --reinstall virt-manager Commented Sep 9, 2018 at 21:06
  • Running sudo apt install --reinstall virt-manager gives: /var/lib/dpkg/info/virt-manager.prerm: 6: /var/lib/dpkg/info/virt-manager.prerm: pyclean: not found new virt-manager package pre-removal script subprocess returned error exit status 127 Errors were encountered while processing: /var/cache/apt/archives/virt-manager_1%3a1.5.1-0ubuntu1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) Commented Sep 9, 2018 at 21:18

3 Answers 3

4

You said the error was, in relevant part:

pyclean: not found 

pyclean was provided by python-minimal package, so you should reinstall that first.

3

Same issue here, found issue was caused by a python library update after installing awscli. I was forced to restart my system and tried opneing virt-manager and could not open it via GUI, wne to cli and ran:

sudo virt-manager 

returned:

/usr/lib/python2.7/dist-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.24.1) or chardet (3.0.4) doesn't match a supported version! RequestsDependencyWarning) 

A Google search found this thread on github: https://github.com/requests/requests/issues/4673. They were all discussing about the urllib3 (1.23.1) breaking a bunch of apps including awscli; which I had just installed 2 days prior. At the end of a thread one of the users explained that he back reved the library to version 1.22 and installed awscli again which fixed his problem. Command:

pip install --upgrade "urllib3==1.22" awscli awsebcli 

Welp monkey see it works, monkey follow and it fixed my issue with Virt-Manager, tested awscli and it still works so.

TLDR: if you installed awscli and now Virt-manager broken run

pip install --upgrade "urllib3==1.22" awscli awsebcli 
0
0

The issue is that the error message "exec: /usr/share/virt-manager/virt-manager: not found" is misleading. Most likely it just can't find the python interpreter. Try running /usr/share/virt-manager/virt-manager because you'll find it is most likely there. You will see an error message akin to "bash: /usr/share/virt-manager/virt-manager: /usr/bin/python2: bad interpreter: No such file or directory". Make sure you have python 2 installed. After the upgrade you'll likely have /usr/bin/python2.7 in place. Create a symlink to python2 like so: sudo ln -s /usr/bin/python2.7 /usr/bin/python2. After that ./virt-manager should start again just fine.

1
  • Indeed, Michael Hampton's (accepted) answer covers exactly the situation where a program was not found. It's always useful, when answering, to consider the existing solutions, particularly ones that have been accepted by the asker. Commented Dec 4, 2020 at 21:12

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.