Perl 模块安装错误 CPAN

问题描述 投票:0回答:3

当我尝试在 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,我得到了同样的错误。

perl cpan
3个回答
41
投票

查看错误信息:

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,错误消息已经告诉你它在那里不存在。


2
投票

更简单的选择可能是:

$ sudo apt-get install libspreadsheet-writeexcel-perl

0
投票

对于我(Ubuntu 24.04)以下刚刚解决了我的问题:

 $ sudo apt install make
© www.soinside.com 2019 - 2024. All rights reserved.