我用 Easy_install 安装了 Mercurial,现在我得到“没有名为‘hg’的脚本”

发布于 2024-10-17 02:25:48 字数 876 浏览 2 评论 0原文

我在(32 位)Ubuntu 9.10 上安装了 Mercurial,使用:

sudo easy_install mercurial

它安装了 Mercurial 1.7.5。

我后来了解到,使用这种安装方式是 Mercurial 团队谴责的,尽管原因如下它不应该工作不清楚。

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

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'

我该如何解决这个问题?如何轻松_卸载安装它?

注意:我注意到 sudo hg 有效。

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

sudo easy_install mercurial

It installed Mercurial 1.7.5.

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.

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'

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

Note: I have noticed sudo hg works.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

演多会厌 2024-10-24 02:25:48

转至 /usr/local/lib/python2.6/dist-packages (或 Python 安装的相应目录)。

输入ls -l,您将找到类似这样的条目。

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

如果您没有以 root 身份登录,则无权访问该内容。尝试:

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

这为您提供了访问权限,并且足以让我的事情重新开始。

我仍然不知道如何卸载原来造成的混乱。

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

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

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文