Mac에 rpostgresql을 설치하려고합니다. IP 주소를 사용하여 서버에 연결하고 데이터를 데이터 프레임으로 읽길 원합니다. 나는 CRAN에서 패키지를 다운로드 한 다음 줄 실행 :OSX 10.7.2를 사용하여 Mac에 RPostgresql 설치
install.packages('/Users/celenius/Downloads/RPostgreSQL_0.2-1.tar.gz', type='source')
이 패키지를 컴파일 시작을하지만, 다음과 같은 오류 메시지와 함께 결과 :
> install.packages('/Users/celenius/Downloads/RPostgreSQL_0.2-1.tar.gz', type='source')
Installing package(s) into ‘/Library/Frameworks/R.framework/Versions/2.14/Resources/library’
(as ‘lib’ is unspecified)
inferring 'repos = NULL' from the file name
* installing *source* package ‘RPostgreSQL’ ...
** package ‘RPostgreSQL’ successfully unpacked and MD5 sums checked
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for pg_config... /usr/bin/pg_config
checking for "/usr/include/libpq-fe.h"... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
*** arch - x86_64
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/include -I/usr/local/include -fPIC -g -O2 -c RS-DBI.c -o RS-DBI.o
make: gcc-4.2: No such file or directory
make: *** [RS-DBI.o] Error 1
ERROR: compilation failed for package ‘RPostgreSQL’
* removing ‘/Library/Frameworks/R.framework/Versions/2.14/Resources/library/RPostgreSQL’
Warning in install.packages :
installation of package ‘/Users/celenius/Downloads/RPostgreSQL_0.2-1.tar.gz’ had non-zero exit status
나는 rpostgresql에 대한 조언을 통해 봤는데 웹 페이지 (1, 2)이지만 많은 제안 사항이 1 년이 넘었으므로이 패키지를 설치하는 방법에 대한 최근 조언이있을 것으로 생각됩니다.
GCC는 더 이상이 실패하는 이유는 엑스 코드 4.2에 포함되어 있습니다 : 가장 쉬운 방법은 homebrew를 사용하는 경우, 단순히 터미널에서 다음을하지하는 것입니다, 그렇게 할 수 있습니다. 이 경우 해결 방법이 무엇인지 모르겠지만 RPostreSQL 개발자에게 연락하는 것이 가장 좋습니다. –
정말이에요? http://hints.macworld.com/article.php?story=20110318050811544 –
GCC가 Xcode에 더 이상 포함되어 있지 않습니다. 예. 당신이 링크 한 기사는 그 점도 언급합니다. –