Ubuntu 18.x の Perl ディレクトリにモジュール「core」が見つかりません

Ubuntu 18.x の Perl ディレクトリにモジュール「core」が見つかりません

nginx をコンパイルしようとしています... configure は問題ないようです。その後、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がコアディレクトリをインストールしないのはなぜですか?また、インストール方法を教えてください。

答え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 でも同様のパッケージが必要になると思われます。

関連情報