我很容易地安装了Mercurial,现在我得到了“没有名为"hg"的脚本". [英] I easy_install'ed Mercurial, and now I get "No script named 'hg'"

查看:119
本文介绍了我很容易地安装了Mercurial,现在我得到了“没有名为"hg"的脚本".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下命令在32位Ubuntu 9.10上安装了Mercurial:

I installed Mercurial on (32-bit) Ubuntu 9.10, using:

sudo easy_install mercurial

它安装了Mercurial 1.7.5.

It installed Mercurial 1.7.5.

此后,我了解到,使用这种安装方式是Mercurial小组谴责,尽管不清楚它为什么不起作用的原因.

I have since learned that using this way of installing is denounced by the Mercurial Team, although the reasons why it shouldn't work are not clear.

当我运行命令hg时,它响应:

When I ran the command hg it responded:

Traceback (most recent call last):
  File "/usr/local/bin/hg", line 5, in <module>
    pkg_resources.run_script('mercurial==1.7.5', 'hg')
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 448, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1160, in run_script
    raise ResolutionError("No script named %r" % script_name)
pkg_resources.ResolutionError: No script named 'hg'

我该如何解决?我如何easy_ un 安装它?

How do I fix this? How do I easy_uninstall it?

注意:我注意到sudo hg可行.

推荐答案

转到/usr/local/lib/python2.6/dist-packages(或适合您的Python安装的目录).

Go to /usr/local/lib/python2.6/dist-packages (or the appropriate directory for your Python install).

键入ls -l,您会找到类似这样的条目.

Type ls -l and you will find an entry something like so.

drwx--S--- 5 root staff 4096 Feb 14 11:13 mercurial-1.7.5-py2.6-linux-i686.egg

如果您没有以root用户身份登录,则您无权访问.试试:

You don't have access to that if you are not logged in as root. Try:

sudo chmod -R o+rX mercurial-1.7.5-py2.6-linux-i686.egg/

这给了您访问权限,足以让我重新开始工作.

That gives you access and was enough to get things going again for me.

我仍然不知道如何卸载原来的烂摊子.

I still don't know how to uninstall the original mess that was made.

这篇关于我很容易地安装了Mercurial,现在我得到了“没有名为"hg"的脚本".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆