Jak*_*kob 8 perl heroku libxslt
我无法在Heroku上安装XML :: LibXSLT.尽管在Heroku stack cedar和cedar-14中列出了已安装的Ubuntu软件包,但看起来并没有安装所需的库.在这个问题中已经报告了类似的问题,但是没有在Heroku上报告,并且不允许安装新的Ubuntu软件包.gdbm
要重现错误,请创建一个最小的存储库,需要XML :: LibXSLT cpanfile
:
$ git init
$ echo 'requires "XML::LibXSLT";' > cpanfile
$ echo 'sub { [200,[], ['Hello World']] }' > app.psgi
$ git add cpanfile app.psgi
$ git commit -m "initial commit"
Run Code Online (Sandbox Code Playgroud)
使用heroku-buildpack-perl创建一个新的Heroku应用程序来运行cpanm
:
$ heroku create --stack cedar --buildpack https://github.com/miyagawa/heroku-buildpack-perl.git
$ git push heroku master
Run Code Online (Sandbox Code Playgroud)
错误日志包含
! 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 ..
Run Code Online (Sandbox Code Playgroud)
要获得更详细的错误消息,请尝试手动安装:
$ heroku run cpanm --verbose XML::LibXSLT
Run Code Online (Sandbox Code Playgroud)
失败,出现以下错误
....
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.
Run Code Online (Sandbox Code Playgroud)
正如上面所指出的,Heroku的已安装了Ubuntu的软件包libgdbm3
,并libxslt1-dev
(与确认heroku run dpkg --get-selection
),所以我不知道为什么编译仍然失败.
小智 2
尝试安装libgdbm的开发包
apt-get install libgdbm-dev
Run Code Online (Sandbox Code Playgroud)
CPAN 通常需要开发包来安装模块。
归档时间: |
|
查看次数: |
285 次 |
最近记录: |