当我在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。
接下来要做什么的任何提示?
这看起来不对。 `-dev`包为你做。 – 2011-01-14 16:05:49