gpt4 book ai didi

python - 无法在 heroku 上安装 reportlab

转载 作者:太空宇宙 更新时间:2023-11-04 01:16:40 24 4
gpt4 key购买 nike

我正在尝试在 heroku 上安装 reportlab 2.7,但编译失败。

我生成了一台带有远程 shell 的机器并尝试编译它。启动 python setup.py build 时出现的错误如下

gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DRENDERPM_FT -DLIBART_COMPILATION -DLIBART_VERSION="2.3.12" -I/app/reportlab-2.7/src/rl_addons/renderPM -I/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl -I/app/reportlab-2.7/src/rl_addons/renderPM/gt1 -I/usr/include -I/usr/include/freetype2 -I/app/.heroku/python/include/python2.7 -c /app/reportlab-2.7/src/rl_addons/renderPM/gt1/gt1-region.c -o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/gt1/gt1-region.o
gcc -pthread -shared build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/_renderPM.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_vpath_bpath.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_rgb_pixbuf_affine.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_rgb_svp.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_svp.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_svp_vpath.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_svp_vpath_stroke.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_svp_ops.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_vpath.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_vpath_dash.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_affine.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_rect.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_rgb_affine.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_rgb_affine_private.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_rgb.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_rgb_rgba_affine.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_svp_intersect.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_svp_render_aa.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/libart_lgpl/art_misc.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/gt1/gt1-parset1.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/gt1/gt1-dict.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/gt1/gt1-namecontext.o build/temp.linux-x86_64-2.7/app/reportlab-2.7/src/rl_addons/renderPM/gt1/gt1-region.o -L/usr/local/lib -L/usr/lib -L/app/.heroku/python/lib -L/app/.heroku/python/lib -lfreetype -lpython2.7 -o build/lib.linux-x86_64-2.7/_renderPM.so
/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

为什么会失败?我一年前创建的另一个应用程序从未遇到过这个问题。

我怀疑 buildpack 被更改了,但我不知道有什么不同,也不知道如何修复它。

最佳答案

好消息!

reportlab 错误现已在 python-2.7.7 运行时得到修复。

关于python - 无法在 heroku 上安装 reportlab,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24097490/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com