我有一個 64 位元 ubuntu 10.04 系統ubuntu-desktop
。所以我透過DVD中的ISO映像安裝了ubuntu 12.04 32位元系統,並保持相同的使用者名稱/home
。
我已經在 ubuntu 12.04 上安裝了mercurial
。sudo apt-get
我確信 Mercurial 正在嘗試存取早期的 64 位元系統/usr/local/lib/
。
需要幫助來解決這個問題。
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.6
和python2.7
資料夾。我已經複製/usr/lib/python2.6
並python2.7
複製了/usr/local/lib/
位置。
cp -Rp /usr/lib/python2.6 /usr/local/lib/
cp -Rp /usr/lib/python2.7 /usr/local/lib/