2011-01-14 127 views
1

當我在EC2上調出Debian Lenny的基本映像(實際上EC2上的EMR)時,我得到了Lenny 5.0.7版本,我可以使用方法outlined in a previous question升級R。升級R後,我有版本2.12。R:在Debian Lenny上升級Hmisc

我一直無法安裝Hmisc軟件包。我看到它有一個Debian軟件包,所以我已經試過:

sudo apt-get update 
sudo apt-get install r-cran-hmisc 

這似乎是工作,但是當我進入RI得到如下:

> require(Hmisc) 
Loading required package: Hmisc 
Failed with error: ‘package 'Hmisc' was built before R 2.10.0: please re-install it’ 

所以我推測Hmisc在Debian repo是一箇舊版本。所以我只會升級。於是我去到R和:

... 
gcc -I/usr/share/R/include  -fpic -std=gnu99 -O3 -pipe -g -c string_box.c -o string_box.o 
gfortran -fpic -O3 -pipe -g -c wclosest.f -o wclosest.o 
gcc -shared -o Hmisc.so Hmisc.o cidxcn.o cidxcp.o hoeffd.o jacklins.o largrec.o mChoice.o nstr.o ranksort.o rcorr.o string_box.o wclosest.o -lgfortran -lm -L/usr/lib64/R/lib -lR 
/usr/bin/ld: cannot find -lgfortran 
collect2: ld returned 1 exit status 
make: *** [Hmisc.so] Error 1 
ERROR: compilation failed for package ‘Hmisc’ 
* removing ‘/home/hadoop/R/x86_64-pc-linux-gnu-library/2.12/Hmisc’ 

The downloaded packages are in 
    ‘/tmp/Rtmp2Ej5Tn/downloaded_packages’ 
Warning message: 
In install.packages("Hmisc") : 
    installation of package 'Hmisc' had non-zero exit status 
> 

它看起來像LD與lgfortran掙扎:

install.packages("Hmisc") 

與失敗。我檢查並安裝了gfortran。所以我嘗試安裝gfortran-4.1:

sudo apt-get install gfortran-4.1 

這並沒有改變任何東西。也沒有安裝4.2。

接下來要做什麼的任何提示?

回答

0

我偶然發現this previous question後我張貼在這裏。看來我需要手動鏈接到gfortran庫:

sudo ln -s /usr/lib/libgfortran.so.3 /usr/lib/libgfortran.so 

更新集羣包後,我能夠install.packages("Hmisc")

+0

這看起來不對。 `-dev`包爲你做。 – 2011-01-14 16:05:49

1

當您安裝r-base-dev包,會發生什麼?它是否構建呢?這應該。