ImportError: No module named cElementTree
ImportError: No module named cElementTree
進行yum安裝時報錯
作業系統CentOS6.4
2.6.32-358.el6.x86_64
[root@shnagiosapp7 ~]# yum install gcc
Loaded plugins: fastestmirror
Determining fastest mirrors
Server | 2.9 kB 00:00 ...
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 285, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 136, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 434, in doCommands
self._getTs(needTsRemove)
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 99, in _getTs
self._getTsInfo(remove_only)
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 110, in _getTsInfo
pkgSack = self.pkgSack
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 887, in
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 669, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 308, in populateSack
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 165, in populate
if self._check_db_version(repo, mydbtype):
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 223, in _check_db_version
return repo._check_db_version(mdtype)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1256, in _check_db_version
repoXML = self.repoXML
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1455, in
repoXML = property(fget=lambda self: self._getRepoXML(),
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1447, in _getRepoXML
self._loadRepoXML(text=self)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1437, in _loadRepoXML
return self._groupLoadRepoXML(text, self._mdpolicy2mdtypes())
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1412, in _groupLoadRepoXML
if self._commonLoadRepoXML(text):
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1230, in _commonLoadRepoXML
result = self._getFileRepoXML(local, text)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1008, in _getFileRepoXML
size=102400) # setting max size as 100K
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 830, in _getFile
size=size
File "/usr/lib/python2.6/site-packages/urlgrabber/mirror.py", line 408, in urlgrab
return self._mirror_try(func, url, kw)
File "/usr/lib/python2.6/site-packages/urlgrabber/mirror.py", line 394, in _mirror_try
return func_ref( *(fullurl,), **kwargs )
File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 985, in urlgrab
return self._retry(opts, retryfunc, url, filename)
File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 886, in _retry
r = apply(func, (opts,) + args, {})
File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 980, in retryfunc
apply(cb_func, (obj, )+cb_args, cb_kwargs)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1494, in _checkRepoXML
repoXML = repoMDObject.RepoMD(self.id, filepath)
File "/usr/lib/python2.6/site-packages/yum/repoMDObject.py", line 124, in __init__
self.parse(srcfile)
File "/usr/lib/python2.6/site-packages/yum/repoMDObject.py", line 140, in parse
parser = iterparse(infile)
File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1141, in cElementTree_iterparse
_cElementTree_import()
File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1136, in _cElementTree_import
import cElementTree
ImportError: No module named cElementTree
報以上錯誤時因為在環境變數中設定了 LD_LIBRARY_PATH 。
去掉變數重新開啟一個session,echo $LD_LIBRARY_PATH 檢視變數為空。再次執行yum 成功。
字元模式下設定/刪除環境變數
bash下
設定:export 變數名=變數值
刪除:unset 變數名
設定為空
export LD_LIBRARY_PATH=
設定回原來的值
export LD_LIBRARY_PATH=/app/oracle/ora11g/lib:/lib:/usr/lib:/usr/local/lib
進行yum安裝時報錯
作業系統CentOS6.4
2.6.32-358.el6.x86_64
[root@shnagiosapp7 ~]# yum install gcc
Loaded plugins: fastestmirror
Determining fastest mirrors
Server | 2.9 kB 00:00 ...
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 285, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 136, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 434, in doCommands
self._getTs(needTsRemove)
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 99, in _getTs
self._getTsInfo(remove_only)
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 110, in _getTsInfo
pkgSack = self.pkgSack
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 887, in
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 669, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 308, in populateSack
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 165, in populate
if self._check_db_version(repo, mydbtype):
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 223, in _check_db_version
return repo._check_db_version(mdtype)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1256, in _check_db_version
repoXML = self.repoXML
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1455, in
repoXML = property(fget=lambda self: self._getRepoXML(),
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1447, in _getRepoXML
self._loadRepoXML(text=self)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1437, in _loadRepoXML
return self._groupLoadRepoXML(text, self._mdpolicy2mdtypes())
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1412, in _groupLoadRepoXML
if self._commonLoadRepoXML(text):
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1230, in _commonLoadRepoXML
result = self._getFileRepoXML(local, text)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1008, in _getFileRepoXML
size=102400) # setting max size as 100K
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 830, in _getFile
size=size
File "/usr/lib/python2.6/site-packages/urlgrabber/mirror.py", line 408, in urlgrab
return self._mirror_try(func, url, kw)
File "/usr/lib/python2.6/site-packages/urlgrabber/mirror.py", line 394, in _mirror_try
return func_ref( *(fullurl,), **kwargs )
File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 985, in urlgrab
return self._retry(opts, retryfunc, url, filename)
File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 886, in _retry
r = apply(func, (opts,) + args, {})
File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 980, in retryfunc
apply(cb_func, (obj, )+cb_args, cb_kwargs)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1494, in _checkRepoXML
repoXML = repoMDObject.RepoMD(self.id, filepath)
File "/usr/lib/python2.6/site-packages/yum/repoMDObject.py", line 124, in __init__
self.parse(srcfile)
File "/usr/lib/python2.6/site-packages/yum/repoMDObject.py", line 140, in parse
parser = iterparse(infile)
File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1141, in cElementTree_iterparse
_cElementTree_import()
File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1136, in _cElementTree_import
import cElementTree
ImportError: No module named cElementTree
報以上錯誤時因為在環境變數中設定了 LD_LIBRARY_PATH 。
去掉變數重新開啟一個session,echo $LD_LIBRARY_PATH 檢視變數為空。再次執行yum 成功。
字元模式下設定/刪除環境變數
bash下
設定:export 變數名=變數值
刪除:unset 變數名
設定為空
export LD_LIBRARY_PATH=
設定回原來的值
export LD_LIBRARY_PATH=/app/oracle/ora11g/lib:/lib:/usr/lib:/usr/local/lib
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29500582/viewspace-1718523/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ImportError: No module named `defusedxml`ImportErrorXML
- ImportError: No module named yamlImportErrorYAML
- ImportError: No module named utilsImportError
- ImportError: No module named torchvisionImportError
- ImportError: No module named builtinsImportErrorUI
- ImportError: No module named ‘torch‘ 解決方法ImportError
- ImportError:No module named SCons.ScriptImportError
- ImportError: No module named setuptools 解決方法ImportError
- ImportError: No module named thrift.Thrift問題解決ImportError
- pip安裝錯誤:ImportError: No module named 'pkg_resources'ImportError
- 啟動uwsgi報錯ImportError: No module named, unable to load appImportErrorAPP
- media-dispatcher啟動時報ImportError: No module named application.processImportErrorAPP
- pyecharts安裝後import錯誤 ImportError: No module named 'pyecharts_snapshot'EchartsImportError
- Window7 python2.7 拋錯ImportError No module named mysql.connectorPythonImportErrorMySql
- ImportError: No module named flask 導包失敗,Python3 重新安裝 Flask 模組ImportErrorFlaskPython
- pycharm環境,命令列執行提示:ImportError: No module named xxx 解決方法PyCharm命令列ImportError
- ModuleNotFoundError: No module named 'sqlite'ErrorSQLite
- ModuleNotFoundError: No module named 'pyttsx'ErrorTTS
- ModuleNotFoundError: No module named ‘Crypto‘ ‘Cryptodome‘Error
- linux已經安裝bert4keras但出現ImportError: No module named ‘bert4keras‘LinuxKerasImportError
- ModuleNotFoundError: No module named 'phkit.pinyin'Error
- No module named MYSQLdb 問題解決MySql
- ModuleNotFoundError: No module named ‘DBUtils‘解決辦法Error
- Linux:Python報錯:No module named MySQLdbLinuxPythonMySql
- ModuleNotFoundError: No module named ‘cv2’——(版本問題)Error
- python ModuleNotFoundError: No module named ‘requests‘ 的 解決方案PythonError
- ImportError: cannot import name 'get_ora_doc' from partially initialized moduleImportErrorZed
- 使用PyCharm時顯示的 No module named ‘xxx’PyCharm
- yum依賴python2環境-"No module named urlgrabber"Python
- 解決Python找不到ssl模組問題 No module named _sslPython
- Scrapy學習中解決No module named tutorial.items問題
- ModuleNotFoundError: No module named ‘matplotlib‘ 一系列解決辦法Error
- 問題結局辦法:Error loading psycopg2 module: No module named ‘psycopg2‘Error
- 使用Pycharm出現No module named Test_01_module_a less... (Ctrl+F1) This inspection detects names that shPyCharm
- 解決:ModuleNotFoundError: No module named ‘urllib3.packages.six.moves問題ErrorPackage
- centos 解決python3.7 安裝時No module named _ssl 親測有效CentOSPython
- pip成功安裝gdal的whl檔案後,PyCharm仍報錯No module named ‘osgeo’PyCharm
- centos安裝Python外掛後找不到對應的外掛ModuleNotFoundError: No module named*CentOSPythonError