Closed 275ysys closed 1 year ago
You need to show us what you are doing, i.e. the command that you are running, and also the full output.
My Linux distribution is Ubuntu22.02-LTS,Linux-kernel 5.15,R-version 4.2.1,I run command install.packages('ps')
to install 'ps' package,and it output:
- installing source package ‘ps’ ... Success will be "ps" package solution package and MD5 and check using staged installation Error in file(con, "wb") : cannot open the connectio Calls: writeBin -> file besides: Warning message: In file(con, "wb") : can not open 'src/error-codes.c': no such file or directory Stop execution ** libs gcc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -flto=auto -ffat-lto-objects -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -Wall px.c -o px gcc -I"/usr/include/R/" -DNDEBUG -I/usr/local/include -fpic -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -flto=auto -ffat-lto-objects -c init.c -o init.o gcc -I"/usr/include/R/" -DNDEBUG -I/usr/local/include -fpic -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -flto=auto -ffat-lto-objects -c api-common.c -o api-common.o gcc -I"/usr/include/R/" -DNDEBUG -I/usr/local/include -fpic -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -flto=auto -ffat-lto-objects -c common.c -o common.o gcc -I"/usr/include/R/" -DNDEBUG -I/usr/local/include -fpic -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -flto=auto -ffat-lto-objects -c extra.c -o extra.o gcc -I"/usr/include/R/" -DNDEBUG -I/usr/local/include -fpic -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -flto=auto -ffat-lto-objects -c dummy.c -o dummy.o make: *** no rules can make goals“error-codes.o”,by “ps.so” need。 stop。 ERROR: compilation failed for package ‘ps’
- removing ‘/home/xiaobao/R/x86_64-pc-linux-gnu-library/4.2/ps’
- restoring previous ‘/home/xiaobao/R/x86_64-pc-linux-gnu-library/4.2/ps’ Warning in install.packages : installation of package 'ps' had non-zero exit status
That does not seem like the full output, though. Where is the package downloaded from? It also seems incorrect English.
In any case what is the output of sessionInfo()
?
Hi, I have the same issue. I recently updated to R 4.2.2 and while installing some packages I got an error saying the ps
package was not found, then I tried to install it with the command
install.packages('ps', dependencies=TRUE)
The installation failed and the main error was this one:
Error: package or namespace load failed for ‘ps’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/lib64/R/library/00LOCK-ps/00new/ps/libs/ps.so':
/usr/lib64/R/library/00LOCK-ps/00new/ps/libs/ps.so: undefined symbol: stat
Error: loading failed
Execution halted
ERROR: loading failed
It apparently appears every time I try to install some packages, several ps
dependencies output the same error. Probably I missed installing a library where the stat
is defined. Do you know about this error?
My sessionInfo()
:
R version 4.2.2 (2022-10-31)
Platform: x86_64-suse-linux-gnu (64-bit)
Running under: openSUSE Leap 15.3
Matrix products: default
BLAS: /usr/lib64/R/lib/libRblas.so
LAPACK: /usr/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=C
[4] LC_COLLATE=C LC_MONETARY=C LC_MESSAGES=C
[7] LC_PAPER=C LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=C LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Rcpp_1.0.9
loaded via a namespace (and not attached):
[1] compiler_4.2.2 tools_4.2.2
Thanks a lot!
@moibernabeu that does not look like the same error to me, the error message is completely different.
A workaround is to install package binaries from RSPM, which supports openSUSE: https://packagemanager.rstudio.com/client/#/
Thanks, I just tried and I got the same error...
Can you show the command(s) you were running, and also the full output?
Closing for lack of information. Please reopen with the commands and the full output if you still have this issue.
Linux install "ps" package,I run into the following error: