我无法在Heroku上安装XML::LibXSLT。尽管在Heroku stack cedar和cedar-14上安装了listed as installed Ubuntu packages,但看起来所需的库gdbm并未安装。类似的问题在in this question上也有报道,但不是在Heroku上,而且它不允许安装新的Ubuntu包。
为了重现这个错误,创建一个最小的存储库,需要cpanfile中的XML::LibXSLT
$ git init
$ echo 'requires "XML::LibXSLT";' > cpanfile
$ echo 'sub { [200,[], ['Hello World']] }' > app.psgi
$ git add cpanfile app.psgi
$ git commit -m "initial commit"使用heroku-buildpack-perl创建一个新的Heroku应用程序以运行cpanm
$ heroku create --stack cedar --buildpack https://github.com/miyagawa/heroku-buildpack-perl.git
$ git push heroku master错误日志包含
! Installing XML::LibXSLT failed. See /app/.cpanm/work/1412752363.1663/build.log for details. Retry with --force to force install it.
! Installing the dependencies failed: Module 'XML::LibXSLT' is not installed
! Bailing out the installation for ..要获得更详细的错误消息,请尝试手动安装:
$ heroku run cpanm --verbose XML::LibXSLT失败,并显示以下错误
....
LD_RUN_PATH="/usr/lib" cc -shared -O2 -g -L/usr/local/lib -fstack-protector LibXSLT.o perl-libxml-mm.o -o blib/arch/auto/XML/LibXSLT/LibXSLT.so \
-L/usr/lib -lxslt -lxml2 -lz -lm -lexslt -lgdbm -lgdbm_compat -ldl -lm -lpthread -lc -lcrypt \
/usr/bin/ld: cannot find -lgdbm
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/XML/LibXSLT/LibXSLT.so] Error 1
FAIL
! Installing XML::LibXSLT failed. See /app/.cpanm/work/1412753360.2/build.log for details. Retry with --force to force install it.作为noted above,Heroku已经安装了Ubuntu包libgdbm3和libxslt1-dev (用heroku run dpkg --get-selection确认),所以我想知道为什么编译仍然失败。
发布于 2016-06-16 14:53:51
只需尝试安装libgdbm的开发人员包
apt-get install libgdbm-devCPAN通常需要使用dev-package来安装模块。
https://stackoverflow.com/questions/26251521
复制相似问题