简体   繁体   English

安装Reportlab(错误:命令'gcc'失败,退出状态为1)

[英]installing Reportlab (error: command 'gcc' failed with exit status 1 )

I'm trying to install ReportLab 2.4 on a 10.04.2 server with virtualenv. 我正在尝试使用virtualenv在10.04.2服务器上安装ReportLab 2.4。 In the ReportLab_2_4 folder I use: 在ReportLab_2_4文件夹中,我使用:

python setup.py install

and the error I get: 我得到的错误:

error: command 'gcc' failed with exit status 1 错误:命令'gcc'失败,退出状态为1

As Skimantas said, I think you should install python-dev. 正如Skimantas所说,我认为你应该安装python-dev。 sudo apt-get install python-dev and I was able to install reportlab into my home directory with command " pip install reportlab " without sudo as mentioned earlier answer. sudo apt-get install python-dev我能够使用命令“ pip install reportlabpip install reportlab安装到我的主目录中,如前面提到的那样,没有sudo。 I need only root access to install python-dev. 我只需root访问权限即可安装python-dev。

Shortly.. 不久..

I installed virtualenv 我安装了virtualenv

sudo apt-get install python-setuptools
sudo easy_install virtualenv
virtualenv --no-site-packages virtual01

I installed 我安装了

sudo apt-get install python-dev

I activate my virtual environment just to be sure... 我激活我的虚拟环境只是为了确保......

source  ~/virtual01/bin/activate

cd ~/virtual01/bin
pip install reportlab

And that's it. 就是这样。

(I just recorded what I did in Ubuntu 10.04 LTS) (我刚刚录制了我在Ubuntu 10.04 LTS中所做的事情)

I got a very similar error trying to install Reportlab on Mac OS X, which I'd recently upgraded to 10.9. 尝试在Mac OS X上安装Reportlab时出现了类似的错误,我最近将其升级到了10.9。 Run Xcode, agree the the new license agreement, and try again. 运行Xcode,同意新的许可协议,然后重试。

On the outside chance anyone is deploying reportlab to AWS EC2 / ElasticBeanstalk...My solution is below. 在外面有机会将reportlab部署到AWS EC2 / ElasticBeanstalk ...我的解决方案如下。

deactivate && sudo pip install reportlab
sudo cp -r /usr/local/lib64/python2.7/site-packages/reportlab /opt/python/run/venv/lib/python2.7/site-packages/

It's super hacky, but it's a workaround to get it running on my django stack with AWS ElasticBeanstalk. 这是超级hacky,但它是使用AWS ElasticBeanstalk在我的django堆栈上运行它的一种解决方法。 I just just modified .ebextensions/02_python.config to execute the above before continuing further, i think it is set to execute 2nd, after using pip to install requirements.txt to the venv. 我刚刚修改了.ebextensions / 02_python.config以执行上述操作,然后再继续,我认为在使用pip将requirements.txt安装到venv后,它被设置为执行第二个。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 安装超集:错误:命令“gcc”失败,退出状态为 1 - Installing superset: error: command 'gcc' failed with exit status 1 错误:在RHEL上安装pycrypto时,命令'gcc'失败,退出状态为1 - error: command 'gcc' failed with exit status 1 while installing pycrypto on RHEL 命令'gcc'在安装scrapy时失败,退出状态1错误 - command 'gcc' failed with exit status 1 error while installing scrapy 错误:安装 psycopg2 时命令“gcc”失败并显示退出状态 - Error: command 'gcc' failed with exit status when installing psycopg2 错误:命令“ gcc”失败,退出状态为1,正在安装pymix - error: command 'gcc' failed with exit status 1, installing pymix 错误:命令'gcc'失败,退出状态1安装Fatiando(Python包) - error: command 'gcc' failed with exit status 1 installing Fatiando (Python Package) 错误:安装 eventlet 时命令“gcc”失败,退出状态为 1 - error: command 'gcc' failed with exit status 1 while installing eventlet 错误:安装pylibrabbitmq时命令'gcc'失败,退出状态为1 - error: command 'gcc' failed with exit status 1 while installing pylibrabbitmq 错误:安装crf ++时,命令'gcc'失败,退出状态为1 - Error: command 'gcc' failed with exit status 1 while installing crf++ pip 安装 reportlab 错误:命令 'x86_64-linux-gnu-gcc' 失败,退出状态为 1 - pip install reportlab error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM