Rstudio에 패키지 설치 시 서버 연결 실패 문제 해결 방법
3906 단어 R의 학습
> install.packages("randomforeast")
Warning in install.packages :
unable to access index for repository https://mran.microsoft.com/snapshot/2018-08-01/src/contrib:
cannot open URL 'https://mran.microsoft.com/snapshot/2018-08-01/src/contrib/PACKAGES'
Warning in install.packages :
unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/src/contrib:
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES'
Warning in install.packages :
unable to access index for repository https://mran.microsoft.com/snapshot/2018-08-01/src/contrib:
cannot open URL 'https://mran.microsoft.com/snapshot/2018-08-01/src/contrib/PACKAGES'
Warning in install.packages :
unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/src/contrib:
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES'
Warning in install.packages :
package ‘randomforeast’ is not available (for R version 3.5.1)
Warning in install.packages :
unable to access index for repository https://mran.microsoft.com/snapshot/2018-08-01/bin/windows/contrib/3.5:
cannot open URL 'https://mran.microsoft.com/snapshot/2018-08-01/bin/windows/contrib/3.5/PACKAGES'
Warning in install.packages :
unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.5:
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.5/PACKAGES'
Warning message:
In download.file(mirrors_csv_url, destfile = mirrors_csv, quiet = TRUE) :
InternetOpenUrl failed: ''
Warning: unable to access index for repository https://mran.microsoft.com/snapshot/2018-08-01/src/contrib:
cannot open URL 'https://mran.microsoft.com/snapshot/2018-08-01/src/contrib/PACKAGES'
Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/src/contrib:
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES'
패키지 설치 시 서버 연결 불가 문제
(미친 BB: 익숙해지기 전까지 R을 안 썼던 IDE 때문에 오늘 아나콘다에 있는 R스튜디오를 노려보고 높은 걸로 바꿔보려고 했는데 R스튜디오와 호환이 잘 안 돼서 먼지투성이가 돼서 밤새 찾았어요. 여기에 큰 놈을 기록하는 방법을 정리해 놓았어요. 국내 거울로 바꾸는 방법은 거의 다 시도할 거예요. 말도 안 할 거예요.)
Warning in install.packages :
package ‘randomforeast’ is not available (for R version 3.5.1)
Warning in install.packages :
unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.5:
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.5/PACKAGES'
이런 주의는 나처럼 낡은 습관이 직접 각본에서 쓰는 것일 것이다
install.packages()
명령을 직접 설치했습니다.이 문제는 최신 Rstudio용 R버전이 3.5이고 UK 서버가 3.5의 패키지를 업데이트하지 않았기 때문이다. 브라우저로 들어가도 404!그래서 이때 설치 패키지는 반드시 Rstudio 도구 모음에서 Tools → Install packages를 눌러야 합니다. 이렇게 설치하는 과정에서 Rstudio는 자동으로 다른 서버를 검색하여 다운로드합니다!효과는 다음과 같습니다.> install.packages("randomForest")
Warning in install.packages :
unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.5:
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.5/PACKAGES'
trying URL 'https://mran.microsoft.com/snapshot/2018-08-01/bin/windows/contrib/3.5/randomForest_4.6-14.zip'
Content type 'application/zip' length 248635 bytes (242 KB)
downloaded 242 KB
package ‘randomForest’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\hasee\AppData\Local\Temp\RtmpIjXmBI\downloaded_packages
정상적으로 패키지를 설치할 수 있으니 문제가 해결됩니다.