After seemingly-successful installation on Debian Squeeze(via apt-get install mercurial
), hg refuses to start, giving this error:
root@pe-test:/tmp/example.com# hg
abort: couldn't find mercurial libraries in [/usr/bin /usr/lib/python2.6 /usr/lib/python2.6/plat-linux2 /usr/lib/python2.6/lib-tk /usr/lib/python2.6/lib-old /usr/lib/python2.6/lib-dynload /usr/local/lib/python2.6/dist-packages /usr/lib/python2.6/dist-packages /usr/lib/pymodules/python2.6]
(check your install and PYTHONPATH)
The only way I can get it working is to install mercurial via pip install
, but I don't think its a proper way.
I found this bug in the Debian bug tracker: which describes exactly the same issue. The following steps resolved the problem :
debsums -c python-support showed no differences, but reinstalling python-support before reinstalling mercurial and mercurial-common actually solved the issue.
So you can try the following:
apt-get --reinstall install python-support
apt-get --reinstall install mercurial mercurial-common
The problem is apparently that python-support triggers aren't run correctly, but the bug doesn't give any reason as of why. Hopefully the comands below will also solve the issue for you.
Update
As said in multiple comments, running dpkg-reconfigure
seems to be sufficient:
dpkg-reconfigure python-support
Make sure your python version is same...
Or create a link in /usr/bin/python
at proper version, problem will be resolved.
root:~# which python
/usr/bin/python
root:~# ll /usr/bin/python
lrwxrwxrwx 1 root root 9 Dec 9 2015 /usr/bin/python -> python2.7*
root:~#
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With