1

当我安装 B::C 时cpanm,它挂起

$ sudo cpanm B::C
--> Working on B::C
Fetching http://www.cpan.org/authors/id/R/RU/RURBAN/B-C-1.57.tar.gz ... OK
Configuring B-C-1.57 ... OK
Building and testing B-C-1.57 ... ^C
4

1 回答 1

1

首先,您将要尝试使用详细标志检查安装cpanm -v B::C,之后您应该会看到很多循环,例如

x86_64-linux-gnu-gcc  -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/lib/x86_64-linux-gnu/perl/5.28/CORE  -o cccode1_o1 cccode1_o1.c  -Wl,-E  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/x86_64-linux-gnu/perl/5.28/CORE -lperl -ldl -lm -lpthread -lc -lcrypt 2>/dev/null 2>&1
# /usr/bin/ld: cannot find -lperl
collect2: error: ld returned 1 exit status

这是因为ld找不到libperl.so。如果你在 Debian 上,你需要运行,

sudo apt install libperl-dev
于 2019-06-13T19:19:22.527 回答