#r #compiler-errors #quick-install-package
Вопрос:
Я пытаюсь установить пакет, но по какой-то причине он отказывается устанавливаться? Ошибка, которую я получаю, заключается в
ERROR: compilation failed for package 'methylclock.'
install_github("isglobal-brge/methylclock")
Downloading GitHub repo isglobal-brge/methylclock@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?
1: All
2: CRAN packages only
3: None
4: matrixStats (0.58.0 -> 0.59.0) [CRAN]
5: fansi (0.4.2 -> 0.5.0 ) [CRAN]
6: tibble (3.1.1 -> 3.1.2 ) [CRAN]
7: cachem (1.0.4 -> 1.0.5 ) [CRAN]
8: stringi (1.5.3 -> 1.6.2 ) [CRAN]
9: rtracklayer (1.49.5 -> 1.50.0) [CRAN]
10: zip (2.1.1 -> 2.2.0 ) [CRAN]
Enter one or more numbers, or an empty line to skip updates: 1
matrixStats (0.58.0 -> 0.59.0) [CRAN]
fansi (0.4.2 -> 0.5.0 ) [CRAN]
tibble (3.1.1 -> 3.1.2 ) [CRAN]
cachem (1.0.4 -> 1.0.5 ) [CRAN]
stringi (1.5.3 -> 1.6.2 ) [CRAN]
rtracklayer (1.49.5 -> 1.50.0) [CRAN]
zip (2.1.1 -> 2.2.0 ) [CRAN]
Installing 7 packages: matrixStats, fansi, tibble, cachem, stringi, rtracklayer, zip
Warning: package ‘matrixStats’ is in use and will not be installed
Installing packages into ‘C:/Users/saeed/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
There are binary versions available but the source versions are later:
binary source needs_compilation
stringi 1.5.3 1.6.2 TRUE
rtracklayer 1.49.5 1.50.0 TRUE
zip 2.1.1 2.2.0 TRUE
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/fansi_0.5.0.zip'
Content type 'application/zip' length 248461 bytes (242 KB)
downloaded 242 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/tibble_3.1.2.zip'
Content type 'application/zip' length 825073 bytes (805 KB)
downloaded 805 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/cachem_1.0.5.zip'
Content type 'application/zip' length 78389 bytes (76 KB)
downloaded 76 KB
package ‘fansi’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘fansi’
Warning: restored ‘fansi’
package ‘tibble’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘tibble’
Warning: restored ‘tibble’
package ‘cachem’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘cachem’
Warning: restored ‘cachem’
The downloaded binary packages are in
C:UserssaeedAppDataLocalTempRtmpcBVi0vdownloaded_packages
installing the source packages ‘stringi’, ‘rtracklayer’, ‘zip’
trying URL 'https://cran.rstudio.com/src/contrib/stringi_1.6.2.tar.gz'
Content type 'application/x-gzip' length 7575370 bytes (7.2 MB)
downloaded 7.2 MB
trying URL 'https://bioconductor.org/packages/3.12/bioc/src/contrib/rtracklayer_1.50.0.tar.gz'
Content type 'application/x-gzip' length 6369416 bytes (6.1 MB)
downloaded 6.1 MB
trying URL 'https://cran.rstudio.com/src/contrib/zip_2.2.0.tar.gz'
Content type 'application/x-gzip' length 114391 bytes (111 KB)
downloaded 111 KB
* installing *source* package 'stringi' ...
** package 'stringi' successfully unpacked and MD5 sums checked
ERROR: cannot remove earlier installation, is it in use?
* removing 'C:/Users/saeed/Documents/R/win-library/4.0/stringi'
* restoring previous 'C:/Users/saeed/Documents/R/win-library/4.0/stringi'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
problem copying C:UserssaeedDocumentsRwin-library4.00LOCK-stringistringilibsicudt61l.dat to C:UserssaeedDocumentsRwin-library4.0stringilibsicudt61l.dat: Invalid argument
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
problem copying C:UserssaeedDocumentsRwin-library4.00LOCK-stringistringilibsx64stringi.dll to C:UserssaeedDocumentsRwin-library4.0stringilibsx64stringi.dll: Permission denied
* installing *source* package 'rtracklayer' ...
ERROR: cannot remove earlier installation, is it in use?
* removing 'C:/Users/saeed/Documents/R/win-library/4.0/rtracklayer'
* restoring previous 'C:/Users/saeed/Documents/R/win-library/4.0/rtracklayer'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
problem copying C:UserssaeedDocumentsRwin-library4.00LOCK-rtracklayerrtracklayerlibsx64rtracklayer.dll to C:UserssaeedDocumentsRwin-library4.0rtracklayerlibsx64rtracklayer.dll: Permission denied
* installing *source* package 'zip' ...
** package 'zip' successfully unpacked and MD5 sums checked
** using staged installation
** libs
*** arch - i386
"c:/rtools40/mingw32/bin/"gcc -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -DCMDZIP miniz.c zip.c winutils.c tools/cmdzip.c
-municode -o tools/cmdzip.exe
sh: c:/rtools40/mingw32/bin/gcc: No such file or directory
make: *** [Makevars.win:9: tools/cmdzip.exe] Error 127
ERROR: compilation failed for package 'zip'
* removing 'C:/Users/saeed/Documents/R/win-library/4.0/zip'
* restoring previous 'C:/Users/saeed/Documents/R/win-library/4.0/zip'
The downloaded source packages are in
‘C:UserssaeedAppDataLocalTempRtmpcBVi0vdownloaded_packages’
√ checking for file 'C:UserssaeedAppDataLocalTempRtmpcBVi0vremotes4c682cb429e7isglobal-brge-methylclock-6f8c69a/DESCRIPTION' ...
- preparing 'methylclock': (1.3s)
√ checking DESCRIPTION meta-information ...
- cleaning src
- checking for LF line-endings in source and make files and shell scripts
- checking for empty or unneeded directories
- building 'methylclock_0.7.5.tar.gz'
Installing package into ‘C:/Users/saeed/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
* installing *source* package 'methylclock' ...
** using staged installation
** libs
*** arch - i386
"c:/rtools40/mingw32/bin/"g -std=gnu 11 -I"C:/PROGRA~1/R/R-40~1.5/include" -DNDEBUG -I'C:/Users/saeed/Documents/R/win-library/4.0/Rcpp/include' -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c NewModel1Clean.cpp -o NewModel1Clean.o
sh: c:/rtools40/mingw32/bin/g : No such file or directory
make: *** [C:/PROGRA~1/R/R-40~1.5/etc/i386/Makeconf:229: NewModel1Clean.o] Error 127
ERROR: compilation failed for package 'methylclock'
* removing 'C:/Users/saeed/Documents/R/win-library/4.0/methylclock'
Warning messages:
1: In file.copy(savedcopy, lib, recursive = TRUE) :
problem copying C:UserssaeedDocumentsRwin-library4.00LOCKfansilibsx64fansi.dll to C:UserssaeedDocumentsRwin-library4.0fansilibsx64fansi.dll: Permission denied
2: In file.copy(savedcopy, lib, recursive = TRUE) :
problem copying C:UserssaeedDocumentsRwin-library4.00LOCKtibblelibsx64tibble.dll to C:UserssaeedDocumentsRwin-library4.0tibblelibsx64tibble.dll: Permission denied
3: In file.copy(savedcopy, lib, recursive = TRUE) :
problem copying C:UserssaeedDocumentsRwin-library4.00LOCKcachemlibsx64cachem.dll to C:UserssaeedDocumentsRwin-library4.0cachemlibsx64cachem.dll: Permission denied
4: In i.p(...) :
installation of package ‘stringi’ had non-zero exit status
5: In i.p(...) :
installation of package ‘rtracklayer’ had non-zero exit status
6: In i.p(...) : installation of package ‘zip’ had non-zero exit status
7: In i.p(...) :
installation of package ‘C:/Users/saeed/AppData/Local/Temp/RtmpcBVi0v/file4c68a8c1be0/methylclock_0.7.5.tar.gz’ had non-zero exit status
Комментарии:
1. Вы
Rtools40
установили?2. Некоторое время назад у меня была похожая проблема. Первоначально я переименовал (уже) установленные папки пакетов в своей библиотеке. При этом были опущены ошибки «используется»/»не удается удалить». НЕИНТЕРЕСНО для многих посылок … тогда… Я открыл новую сессию = никаких пакетов, загруженных помимо базового, и установил пакет с github. Очевидно, что в новом сеансе ничего не загружается и не блокирует установку/обновление. Сработало как заклинание. Надеюсь, это вам поможет.