我在 ubuntu 18.x 上的 perl 目錄中找不到模組“core”

我在 ubuntu 18.x 上的 perl 目錄中找不到模組“core”

我正在嘗試編譯 nginx ...配置似乎沒問題,然後當我輸入 make 時出現以下錯誤:

make
make -f objs/Makefile
make[1]: Entering directory '/home/paul/src/ngxbuild/nginx-1.14.0'
cc -o objs/ngx_http_perl_module.so \
objs/src/http/modules/perl/ngx_http_perl_module.o \
objs/ngx_http_perl_module_modules.o \
-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC -Wl,-E -fstack-protector-strong -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/perl/5.26/CORE -lperl -ldl -lm -lpthread -lc -lcrypt \
-shared
/usr/bin/x86_64-linux-gnu-ld: cannot find -lperl
collect2: error: ld returned 1 exit status
objs/Makefile:1670: recipe for target 'objs/ngx_http_perl_module.so' failed
make[1]: *** [objs/ngx_http_perl_module.so] Error 1
make[1]: Leaving directory '/home/paul/src/ngxbuild/nginx-1.14.0'
Makefile:8: recipe for target 'build' failed
make: *** [build] Error 2

所以錯誤是找不到-lperl

問題似乎是/usr/lib/x86_64-linux-gnu/perl/5.26/沒有CORE目錄。我使用Ubuntu伺服器18.0,更新併升級,但我找不到更新的方法...

Debian Stretch 包含 perl 5.24.1 和 CORE 目錄存在/usr/lib/x86_64-linux-gnu/perl/5.24/,那麼為什麼 ubuntu 不會安裝 core 目錄以及如何安裝它

答案1

Can not find -lperl錯誤意味著找不到libperl

在 Debian Stretch 上,這是由libperl-dev

% apt-file list libperl-dev
libperl-dev: /usr/lib/x86_64-linux-gnu/libperl.a
libperl-dev: /usr/lib/x86_64-linux-gnu/libperl.so
libperl-dev: /usr/share/doc/libperl-dev/README.cross
libperl-dev: /usr/share/doc/libperl-dev/changelog.Debian.gz
libperl-dev: /usr/share/doc/libperl-dev/copyright

我預計 Ubuntu 上也需要類似的軟體包。

相關內容