我正在运行 Centos 6.0 (Final),i386 版本。
我正在尽最大努力使用 phpMyAdmin 来运行一个像样的 LAMP 服务器。
我可以顺利安装所有东西,MySQL、Apache2 (httpd)、PHP 5.x 等...,但当我阅读一些关于安装 phpMyAdmin 的教程时,我却失败了。我读到的每个教程都提到启用 EPEL/REMI 存储库。一旦我添加此存储库,我就无法再使用 yum 了。
我继续收到此错误消息
[root@username tmp]# yum update
Loaded plugins: aliases, fastestmirror
Loading mirror speeds from cached hostfile
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
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 <lambda>
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 279, in populateSack
self.doSetup()
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 105, in doSetup
self.ayum.plugins.run('postreposetup')
File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 184, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/fastestmirror.py", line 202, in postreposetup_hook
all_urls = FastestMirror(all_urls).get_mirrorlist()
File "/usr/lib/yum-plugins/fastestmirror.py", line 369, in get_mirrorlist
self._poll_mirrors()
File "/usr/lib/yum-plugins/fastestmirror.py", line 413, in _poll_mirrors
pollThread.start()
File "/usr/lib/python2.6/threading.py", line 474, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread
这真让我抓狂。我使用的是 VPS,所以每次发生这种情况时,我都可以轻松地从头开始重新启动,但经过多次相同的结果后,我不知道我哪里出了问题。
答案1
您的(非常小且可能很差的 OpenVZ)VPS 内存已耗尽。
您可以尝试通过禁用(可能严格来说是不必要的) yum 插件来解决此问题,以减少内存使用量:
yum --disableplugin=* update
如果这没有帮助你,你将不得不停止一些服务来释放内存。
如果你仍然什么也去不了,你必须升级你的 VPS 包。