无法在Linux上的RStudio中安装软件包 [英] Trouble installing packages in RStudio on Linux

查看:774
本文介绍了无法在Linux上的RStudio中安装软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Linux上的RStudio中安装以下软件包.我收到以下错误代码.我不太了解我想知道是否有人可以帮助我理解这一点.

I'm trying to install the following package in RStudio on Linux. I'm getting the follow error code. I don't really understand it. I was wondering if anyone could help me make sense of it.

谢谢, 尼克

> install.packages("PKI")
Installing package into ‘/home/nick/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/PKI_0.1-3.tar.gz'
Content type 'application/x-gzip' length 31058 bytes (30 KB)
==================================================
downloaded 30 KB

* installing *source* package ‘PKI’ ...
** package ‘PKI’ successfully unpacked and MD5 sums checked
** libs
gcc -I/usr/include/R/ -DNDEBUG   -D_FORTIFY_SOURCE=2   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong  -c asn1.c -o asn1.o
gcc -I/usr/include/R/ -DNDEBUG   -D_FORTIFY_SOURCE=2   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong  -c init.c -o init.o
gcc -I/usr/include/R/ -DNDEBUG   -D_FORTIFY_SOURCE=2   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong  -c pki-x509.c -o pki-x509.o
pki-x509.c: In function ‘PKI_extract_key’:
pki-x509.c:136:26: error: dereferencing pointer to incomplete type ‘EVP_PKEY {aka struct evp_pkey_st}’
     if (EVP_PKEY_type(key->type) != EVP_PKEY_RSA)
                          ^~
pki-x509.c: In function ‘get_cipher’:
pki-x509.c:244:40: error: dereferencing pointer to incomplete type ‘EVP_CIPHER_CTX {aka struct evp_cipher_ctx_st}’
  ctx = (EVP_CIPHER_CTX*) malloc(sizeof(*ctx));
                                        ^~~~
pki-x509.c: In function ‘PKI_RSAkeygen’:
pki-x509.c:550:5: warning: ‘RSA_generate_key’ is deprecated [-Wdeprecated-declarations]
     rsa = RSA_generate_key(bits, 65537, 0, 0);
     ^~~
In file included from /usr/include/openssl/rsa.h:13:0,
                 from pki.h:13,
                 from pki-x509.c:1:
/usr/include/openssl/rsa.h:193:1: note: declared here
 DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void
 ^
make: *** [/usr/lib64/R/etc/Makeconf:159: pki-x509.o] Error 1
ERROR: compilation failed for package ‘PKI’
* removing ‘/home/nick/R/x86_64-pc-linux-gnu-library/3.4/PKI’
Warning in install.packages :
  installation of package ‘PKI’ had non-zero exit status

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

推荐答案

我认为我最近也遇到了同样的问题.

I think I had the same problem recently.

我通过从 install.packages(<tarball_path>, repos = NULL, type = "source").

实际上,以install.packages('PKI',,'http://www.rforge.net/')会更容易. > PKI RForge页面

Actually, it's easier to run install.packages('PKI',,'http://www.rforge.net/') as written in small print at the bottom of the PKI RForge page

查看新闻,它看起来像是0.1-4版本(也许更稳定)也可以解决该问题,而且很好,它可以在我的系统上运行,而0.1-3不能(目前在CRAN上运行).

Looking at the news, it looks like version 0.1-4 (perhaps more stable) also fixes the problem and, well enough, it works on my system, while 0.1-3 doesn't (the one on CRAN currently).

这篇关于无法在Linux上的RStudio中安装软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆