当我尝试在 ubuntu 12.04 中使用 cpan 安装 Spreadsheet::WriteExcel perl 模块时,出现以下错误。
> Can't exec "/usr/bin/make": No such file or directory at
> /usr/share/perl/5.14/CPAN/Distribution.pm line 2078.
> JMCNAMARA/OLE-Storage_Lite-0.19.tar.gz /usr/bin/make -- NOT OK
> 'YAML' not installed, will not store persistent state Running make
> test Can't test without successful make Running make install Make
> had returned bad status, install seems impossible Running make for
> J/JM/JMCNAMARA/Spreadsheet-WriteExcel-2.40.tar.gz Has already been
> unwrapped into directory
> /root/.cpan/build/Spreadsheet-WriteExcel-2.40-gJaT_A
>
> CPAN.pm: Going to build
> J/JM/JMCNAMARA/Spreadsheet-WriteExcel-2.40.tar.gz
>
> Warning: Prerequisite 'OLE::Storage_Lite => 0.19' for
> 'JMCNAMARA/Spreadsheet-WriteExcel-2.40.tar.gz' failed when processing
> 'JMCNAMARA/OLE-Storage_Lite-0.19.tar. 'make => NO'. Continuing, but
> chances to succeed are limited. Can't exec "/usr/bin/make": No such
> file or directory at /usr/share/perl/5.14/CPAN/Distribution.pm line
> 2078. JMCNAMARA/Spreadsheet-WriteExcel-2.40.tar.gz /usr/bin/make -- NOT OK Running make test Can't test without successful make Running make install Make had returned bad status, install seems
> impossible Failed during this command:
> JMCNAMARA/OLE-Storage_Lite-0.19.tar.gz : make NO
> JMCNAMARA/Spreadsheet-WriteExcel-2.40.tar.gz : make NO
我也尝试了以下更改。没成功。
o conf make /usr/bin/make
o conf commit
然后我尝试安装OLE-Storage_Lite,我得到了同样的错误。
查看错误信息:
Can't exec "/usr/bin/make": No such file or directory at /usr/share/perl/5.14/CPAN/Distribution.pm line 2078.
缺少make
。因此:安装make
。
apt-get install build-essential
将为您提供编译软件所需的大部分内容。
我也尝试了以下更改
那些告诉 CPAN 它可以在
/usr/bin/make
找到 make,错误消息已经告诉你它在那里不存在。
更简单的选择可能是:
$ sudo apt-get install libspreadsheet-writeexcel-perl
对于我(Ubuntu 24.04)以下刚刚解决了我的问题:
$ sudo apt install make