I0ERROR:[Errno 13] .txt 文件的权限被拒绝

I0ERROR:[Errno 13] .txt 文件的权限被拒绝

我正在尝试安装一个名为开放表面在全新安装的 Ubuntu 12.04 上。

当我运行bash ./install_all.sh它时(平稳运行一段时间后)返回以下内容

Traceback (most recent call last):
  File "/usr/local/bin/virtualenv", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2727, in <module>
    add_activation_listener(lambda dist: dist.activate())
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 700, in subscribe
    callback(dist)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2727, in <lambda>
    add_activation_listener(lambda dist: dist.activate())
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2227, in activate
    self.insert_on(path)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2334, in insert_on
    self.check_version_conflict()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2373, in check_version_conflict
    for modname in self._get_metadata('top_level.txt'):
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2221, in _get_metadata
    for line in self.get_metadata_lines(name):
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1209, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1201, in get_metadata
    return self._get(self._fn(self.egg_info,name))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1316, in _get
    stream = open(path, 'rb')
IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/virtualenv-15.1.0.egg-info/top_level.txt'

好的,看来有些top_level.txt是导致问题的原因。因此,我尝试了以下方法:

chmod a+x /usr/.../top_level.txt
chmod o+r /usr/.../top_level.txt

sudo chown -R $USER /usr/...top_level.txt

此外,我曾经gsku nautilus手动进入文件夹以从 root 更改所有权,但无济于事。最后,运行su root返回错误Error: don't run this as root. The script will request your password later

我一直在寻找,但找不到任何有帮助的东西。

相关内容