在 32 位系统下使用 64 位系统的库

在 32 位系统下使用 64 位系统的库

我有一个 64 位 ubuntu 10.04 系统。我搞砸了ubuntu-desktop,它拒绝我登录。所以我通过 DVD 中的 ISO 映像安装了 ubuntu 12.04 32 位系统,保留了相同的用户名。安装时,我重新使用了早期系统的分区,并选择了相同的用户名以保持数据完好无损/home

mercurial我已经在ubuntu 12.04 上安装了sudo apt-get。但是当我运行它时,我收到了这个堆栈跟踪。我确信 mercurial 正在尝试访问早期的 64 位系统。因为我发现有/usr/local/lib/两个 python 安装 - 2.6 和 2.7。

需要帮助来解决此问题。

Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 66, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/local/lib/python2.6/dist-packages/mercurial/demandimport.py", line 95, in _demandimport
    return _import(name, globals, locals, fromlist, level)
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/local/lib/python2.6/dist-packages/mercurial/demandimport.py", line 114, in _demandimport
    mod = _origimport(name, globals, locals)
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 155, in <module>
    class Report(problem_report.ProblemReport):
  File "/usr/local/lib/python2.6/dist-packages/mercurial/demandimport.py", line 86, in __getattribute__
    self._load()
  File "/usr/local/lib/python2.6/dist-packages/mercurial/demandimport.py", line 58, in _load
    mod = _origimport(head, globals, locals)
  File "/usr/lib/python2.7/dist-packages/problem_report.py", line 93, in <module>
    class ProblemReport(UserDict):
TypeError: Error when calling the metaclass bases
    module.__init__() takes at most 2 arguments (3 given)

Original exception was:
Traceback (most recent call last):
  File "/usr/local/bin/hg", line 36, in <module>
    mercurial.util.setbinary(fp)
  File "/usr/local/lib/python2.6/dist-packages/mercurial/demandimport.py", line 86, in __getattribute__
    self._load()
  File "/usr/local/lib/python2.6/dist-packages/mercurial/demandimport.py", line 58, in _load
    mod = _origimport(head, globals, locals)
  File "/usr/local/lib/python2.6/dist-packages/mercurial/util.py", line 67, in <module>
    statfiles = getattr(osutil, 'statfiles', platform.statfiles)
  File "/usr/local/lib/python2.6/dist-packages/mercurial/demandimport.py", line 86, in __getattribute__
    self._load()
  File "/usr/local/lib/python2.6/dist-packages/mercurial/demandimport.py", line 58, in _load
    mod = _origimport(head, globals, locals)
ImportError: /usr/local/lib/python2.6/dist-packages/mercurial/osutil.so: wrong ELF class: ELFCLASS64

答案1

好吧,我找到了答案,我删除了/usr/local/lib/python2.6python2.7文件夹。我复制了/usr/lib/python2.6python2.7位置/usr/local/lib/。这招奏效了。

cp -Rp /usr/lib/python2.6  /usr/local/lib/
cp -Rp /usr/lib/python2.7   /usr/local/lib/

相关内容