2017-05-30 104 views
2

我嘗試在Docker鏡像中的Centos7上安裝帶有XLSX支持的gdata軟件包。運行命令gdata :: installXLSXsupport()失敗。Docker上gdata :: installXLSXsupport()的錯誤CentOS 7

我Dockerfile如下所示:

Step 10/10 : RUN R -e "gdata::installXLSXsupport()" 
---> Running in 4e15bdcd2422 

R version 3.3.3 (2017-03-06) -- "Another Canoe" 
Copyright (C) 2017 The R Foundation for Statistical Computing 
Platform: x86_64-redhat-linux-gnu (64-bit) 

R is free software and comes with ABSOLUTELY NO WARRANTY. 
You are welcome to redistribute it under certain conditions. 
Type 'license()' or 'licence()' for distribution details. 

R is a collaborative project with many contributors. 
Type 'contributors()' for more information and 
'citation()' on how to cite R or R packages in publications. 

Type 'demo()' for some demos, 'help()' for on-line help, or 
'help.start()' for an HTML browser interface to help. 
Type 'q()' to quit R. 

> gdata::installXLSXsupport() 
Attempting to create directory /root/perl5 
Warning: prerequisite Test::More 0 not found. 
Tried to deactivate inactive local::lib '/root/perl5' 
Use of uninitialized value $deactivating in numeric eq (==) at /usr/share/perl5/vendor_perl/local/lib.pm line 381. 
Use of uninitialized value $deactivating in numeric eq (==) at /usr/share/perl5/vendor_perl/local/lib.pm line 383. 
Use of uninitialized value $options{"interpolate"} in numeric eq (==) at /usr/share/perl5/vendor_perl/local/lib.pm line 424. 
Use of uninitialized value $options{"interpolate"} in numeric eq (==) at /usr/share/perl5/vendor_perl/local/lib.pm line 424. 
Use of uninitialized value $options{"interpolate"} in numeric eq (==) at /usr/share/perl5/vendor_perl/local/lib.pm line 424. 
Use of uninitialized value $_[0] in substitution (s///) at /usr/share/perl5/File/Basename.pm line 341. 
fileparse(): need a valid pathname at /usr/share/perl5/CPAN/FirstTime.pm line 1354. 
Error in gdata::installXLSXsupport() : 
Unable to install Perl XLSX support libraries. 

In addition: Warning message: 
running command ''/usr/bin/perl' '/usr/lib64/R/library/gdata/perl/install_modules.pl'' had status 255 
Execution halted 
The command '/bin/sh -c R -e "gdata::installXLSXsupport()"' returned a non-zero code: 1 

什麼可能是這個問題的原因:

FROM centos:latest 

RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 
RUN yum install -y R 
RUN yum install -y libcurl-devel 
RUN yum install -y openssl-devel 
RUN yum install -y libssh2-devel 
RUN yum install -y libxml2-devel 


RUN yum install -y perl-CPAN 
RUN R -e "install.packages('gdata', repos='https://cran.rstudio.com/')" 
RUN R -e "gdata::installXLSXsupport()" 

構建過程的最後一步與消息崩潰?

回答

0

GDATA :: installXLSXsupport() -

此函數調用Perl腳本 'install_modules.pl' 位於 的GDATA包目錄(或安裝/ perl的在 源包perl的子目錄)。這個perl腳本嘗試使用perl'CPAN' 包,它應該作爲大多數perl安裝的一部分被包含, 可以自動下載,編譯和安裝壓縮:: Raw :: Zlib和Spreadsheet :: XLSX perl模塊需要 read.xls

有時使用CPAN會帶來太多的痛苦。

嘗試用

yum install -y perl-Compress-Raw-Zlib perl-Spreadsheet-XLSX

+0

由於更換RUN R -e "gdata::installXLSXsupport()"。不幸的是它不起作用(加載gdata時的消息仍然顯示)。奇怪的是,正如你所引用的,文檔說這就是這個函數正在做的事情。我試圖在安裝包之前安裝它(這樣可能會在軟件包安裝過程中以某種方式使用它),但它不起作用。但是,安裝時,「RUN R -e」gdata :: installXLSXsupport()返回的錯誤更改爲「gdata :: installXLSXsupport()中的錯誤: 無法安裝Perl XLSX支持庫。 執行停止「。 –