2017-05-13 2 views
2

우분투 16.04 64 비트에서 R 및 RStudio를 실행 중이며 클러스터링 분석을 시도 중입니다. 내 오류가이 패키지에만 해당하는 것은 아니지만 ... 그러나 CRAN에서 'ClusterR'패키지를 설치하려고하면 다음 오류가 발생합니다. 모두, 코딩 초보자의 다소 여전히RStudio에서 소스에서 R 패키지를 설치하는 중 문제 - Ubuntu 16.04

Installing package into ‘/home/daniel/R/x86_64-pc-linux-gnu-library/3.4’ 
(as ‘lib’ is unspecified) 
trying URL 'https://cran.rstudio.com/src/contrib/tiff_0.1-5.tar.gz' 
Content type 'application/x-gzip' length 28925 bytes (28 KB) 
================================================== 
downloaded 28 KB 

* installing *source* package ‘tiff’ ... 
** package ‘tiff’ successfully unpacked and MD5 sums checked 
** libs 
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG  -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c common.c -o common.o 
In file included from common.c:1:0: 
common.h:5:18: fatal error: tiff.h: No such file or directory 
compilation terminated. 
/usr/lib/R/etc/Makeconf:159: recipe for target 'common.o' failed 
make: *** [common.o] Error 1 
ERROR: compilation failed for package ‘tiff’ 
* removing ‘/home/daniel/R/x86_64-pc-linux-gnu-library/3.4/tiff’ 
Warning in install.packages : 
    installation of package ‘tiff’ had non-zero exit status 

The downloaded source packages are in 
    ‘/tmp/RtmpuIo1WM/downloaded_packages’ 

난 : 난 그냥 패키지 '티파니'를 설치하려고하면

> install.packages("ClusterR") 
Installing package into ‘/home/daniel/R/x86_64-pc-linux-gnu-library/3.4’ 
(as ‘lib’ is unspecified) 
also installing the dependencies ‘tiff’, ‘OpenImageR’, ‘gmp’ 

trying URL 'https://cran.rstudio.com/src/contrib/tiff_0.1-5.tar.gz' 
Content type 'application/x-gzip' length 28925 bytes (28 KB) 
================================================== 
downloaded 28 KB 

trying URL 'https://cran.rstudio.com/src/contrib/OpenImageR_1.0.6.tar.gz' 
Content type 'application/x-gzip' length 802641 bytes (783 KB) 
================================================== 
downloaded 783 KB 

trying URL 'https://cran.rstudio.com/src/contrib/gmp_0.5-13.1.tar.gz' 
Content type 'application/x-gzip' length 131321 bytes (128 KB) 
================================================== 
downloaded 128 KB 

trying URL 'https://cran.rstudio.com/src/contrib/ClusterR_1.0.5.tar.gz' 
Content type 'application/x-gzip' length 916490 bytes (895 KB) 
================================================== 
downloaded 895 KB 

* installing *source* package ‘tiff’ ... 
** package ‘tiff’ successfully unpacked and MD5 sums checked 
** libs 
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG  -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c common.c -o common.o 
In file included from common.c:1:0: 
common.h:5:18: fatal error: tiff.h: No such file or directory 
compilation terminated. 
/usr/lib/R/etc/Makeconf:159: recipe for target 'common.o' failed 
make: *** [common.o] Error 1 
ERROR: compilation failed for package ‘tiff’ 
* removing ‘/home/daniel/R/x86_64-pc-linux-gnu-library/3.4/tiff’ 
Warning in install.packages : 
    installation of package ‘tiff’ had non-zero exit status 
* installing *source* package ‘gmp’ ... 
** package ‘gmp’ successfully unpacked and MD5 sums checked 
creating cache ./config.cache 
checking for __gmpz_ui_sub in -lgmp... no 
configure: error: GNU MP not found, or not 4.1.4 or up, see http://gmplib.org 
ERROR: configuration failed for package ‘gmp’ 
* removing ‘/home/daniel/R/x86_64-pc-linux-gnu-library/3.4/gmp’ 
Warning in install.packages : 
    installation of package ‘gmp’ had non-zero exit status 
ERROR: dependency ‘tiff’ is not available for package ‘OpenImageR’ 
* removing ‘/home/daniel/R/x86_64-pc-linux-gnu-library/3.4/OpenImageR’ 
Warning in install.packages : 
    installation of package ‘OpenImageR’ had non-zero exit status 
ERROR: dependencies ‘OpenImageR’, ‘gmp’ are not available for package ‘ClusterR’ 
* removing ‘/home/daniel/R/x86_64-pc-linux-gnu-library/3.4/ClusterR’ 
Warning in install.packages : 
    installation of package ‘ClusterR’ had non-zero exit status 

The downloaded source packages are in 
    ‘/tmp/RtmpuIo1WM/downloaded_packages’ 

그리고 실제로, 나는 여기에 증류수 같은 오류를 얻을 R 및 우분투, 그래서 내가 여기서 무엇을 놓치고 있는지 모르겠다? 나는 R에서 이런 식으로 소스를 설치하는 데 필요한 우분투의 의존성/라이브러리를 놓치고 있다는 느낌이 들지만, 확실하지 않습니다. 그리고 'ClusterR'이로드 된 다른 패키지를 포함하여 다른 패키지를 소스에서 설치하는 데 문제가 없습니다.

내가 GCC 포트란 설치, 터미널 코드는 여기에 나와있다 :

[email protected]:~$ gcc --version 
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609 
Copyright (C) 2015 Free Software Foundation, Inc. 
This is free software; see the source for copying conditions. There is NO 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+1

아마도 [this] (https://stat.ethz.ch/pipermail/r-sig-debian/2012-November/002011.html) 도움이 될 것입니다. – akrun

+1

['libtiff-devel'] (https : //github.com/aoles/EBImage/issues/2)이 ​​문제 일 수 있습니다. – Konrad

+0

akrun- 이전 검색어를 보지 못했습니다. 감사합니다. Konrad와 beigel의 답변과 함께이 패키지를 작동시키기 위해 내가해야 할 일을 배우는 것을 도왔습니다. 다들 감사 해요! – CassusVas

답변

2

R 패키지 자주는 티파니 패키지의 CRAN package docs을 선택하면 보통 R. 통해 설치 할 수없는 외부 시스템 종속성이 그것을 언급 티파니 jpeg 라이브러리가 필요합니다. 어쨌든 우분투 패키지 목록을 둘러보고 tiff을 검색하면 libtiff5-dev 패키지로 연결됩니다. 실행

sudo apt-get install libtiff5-dev 

그리고 너 괜찮을거야. R 패키지의 시스템 요구 사항을 설치하려면 일반적으로 -dev과 함께 버전을 설치해야합니다.

+1

내가 필요한 패키지를 알려 주셔서 감사합니다. 그러나 그 정보를 어떻게 결정할 수 있는지 설명해 주셔서 감사합니다. 'libtiff5-dev'는 실제로 _tiff_ 패키지를 설치할 수있게 해주었지만, _gmp_가 여전히 작동하지 않았습니다. 그래서 _gmp_ 요구 사항을 확인하고 우분투에 설치해야한다는 것을 알았습니다. 우분투 패키지 목록에서 찾은 후'libgmp-dev'를 찾아서 설치했습니다. 이제 _ClusterR_가 설치되었고 완벽하게 작동합니다! 다시 감사합니다! – CassusVas

관련 문제