我想在WSL2的Ubuntu上安装Math::CDF,于是运行:
cpan Math::CDF
但是报错:
Loading internal null logger. Install Log::Log4perl for logging messages
Reading '/home/dreapigreen/.cpan/Metadata'
Database was generated on Tue, 30 Mar 2021 12:17:03 GMT
Running install for module 'Math::CDF'
Checksum for /home/dreapigreen/.cpan/sources/authors/id/C/CA/CALLAHAN/Math-CDF-0.1.tar.gz ok
Configuring C/CA/CALLAHAN/Math-CDF-0.1.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning (mostly harmless): No library found for -lm
Writing MYMETA.yml and MYMETA.json
Generating a Unix-style Makefile
Writing Makefile for Math::CDF
Writing MYMETA.yml and MYMETA.json
CALLAHAN/Math-CDF-0.1.tar.gz
/home/dreapigreen/miniconda3/bin/perl Makefile.PL -- OK
Running make for C/CA/CALLAHAN/Math-CDF-0.1.tar.gz
cp CDF.pm blib/lib/Math/CDF.pm
AutoSplitting blib/lib/Math/CDF.pm (blib/lib/auto/Math/CDF)
cd cdflib && make LIBPERL_A="libperl.a" LINKTYPE="dynamic" OPTIMIZE="-O2" PREFIX="/home/dreapigreen/miniconda3/bin/.." PASTHRU_DEFINE=' ' PASTHRU_INC=' '
make[1]: Entering directory '/home/dreapigreen/.cpan/build/Math-CDF-0.1-4/cdflib'
/tmp/build/80754af9/perl_1527832170752/_build_env/bin/x86_64-conda_cos6-linux-gnu-gcc -c -D_REENTRANT -D_GNU_SOURCE --sysroot=/tmp/build/80754af9/perl_1527832170752/_build_env/x86_64-conda_cos6-linux-gnu/sysroot -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC --sysroot=/tmp/build/80754af9/perl_1527832170752/_build_env/x86_64-conda_cos6-linux-gnu/sysroot "-I/home/dreapigreen/miniconda3/lib/5.26.2/x86_64-linux-thread-multi/CORE" dcdflib.c
/bin/sh: 1: /tmp/build/80754af9/perl_1527832170752/_build_env/bin/x86_64-conda_cos6-linux-gnu-gcc: not found
make[1]: *** [Makefile:313: dcdflib.o] Error 127
make[1]: Leaving directory '/home/dreapigreen/.cpan/build/Math-CDF-0.1-4/cdflib'
make: *** [Makefile:1071: cdflib/libcdflib.a] Error 2
CALLAHAN/Math-CDF-0.1.tar.gz
我在网上看过各种解答,都没有解决我的问题。
x86_64-conda_cos6-linux-gnu-gcc: not found
which x86_64-conda_cos6-linux-gnu-gcc
/home/dreapigreen/miniconda3/bin/x86_64-conda_cos6-linux-gnu-gcc
这是怎么回事?