点安装-已杀死 [英] pip install - killed
问题描述
我正在尝试在Ubuntu服务器上使用pip安装软件包:
I'm trying to install package with pip on Ubuntu server:
$ pip install MySQLdb
Downloading/unpacking MySQLdb
Killed
它被杀死了.服务器上有足够的可用RAM.为什么杀死它?
And it's getting killed. There is enough free RAM on server. Why it is killed?
UPD 日志:
内存不足:杀死进程6627(pip)得分297或牺牲孩子
Out of memory: Kill process 6627 (pip) score 297 or sacrifice child
那很奇怪,因为我有大约150 mb的可用RAM.
Thats strange, because I have about 150 mb free RAM.
推荐答案
您必须检查日志,具体取决于ubuntu的版本和内容,它应位于/var/log/messages
或至少位于/var/log
中,以便进行grep python或pip在该文件夹中.这应该提供提示.
You have to check logs, depending on the version of ubuntu and stuff, it should be in /var/log/messages
or at least in /var/log
so you can grep python or pip in that folder. This should provide hints.
此外,如果您不在virtualenv中,则可能应该使用sudo
执行(隐式)特权操作,例如将库复制到全局lib文件夹中.
Also, if you're not in a virtualenv, you should probably use sudo
to perform (implicit) privileged operations, such as copying the library in the global lib folder.
这篇关于点安装-已杀死的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!