安装错误R和RStudio RCurl,PKI和其他软件包

时间:2015-07-11 18:04:06

标签: rstudio rcpp rcurl

我在Kubuntu14.04上安装了新版本的RStudio(即0.99最新版本)。 当我试图上传一个闪亮的应用程序时,我收到一条消息,上面写着"必须安装RCurl和其他几个软件包" - 此安装失败,并显示以下内容:

将软件包安装到

* installing *source* package ‘RCurl’ ...
** package ‘RCurl’ successfully unpacked and MD5 sums checked
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
* removing ‘RCurl’
* installing *source* package ‘packrat’ ...
** package ‘packrat’ successfully unpacked and MD5 sums checked

* installing *source* package ‘PKI’ ...
** package ‘PKI’ successfully unpacked and MD5 sums checked
** libs

In file included from init.c:1:0:
pki.h:11:25: fatal error:   err.h: No such file or directory
                          ^
compilation terminated.
make: *** [init.o] Error 1
ERROR: compilation failed for package ‘PKI’

这是一个例行安装,我重新启动以提供一个干净的启动,但同样的错误发生。 NB Stack-Overflow不会让我发布超过2个链接(并且所有R编译器消息包含数十个链接)所以有更多消息,但我希望这些消息足以确定治愈方法。

感谢:

2 个答案:

答案 0 :(得分:6)

您可以尝试安装包含openssl / err.h文件的libssl-dev。

import pymongo


fields = ['Booked', 'NA', 'AOs', 'AOr']
client = pymongo.MongoClient()
db = client.test
collection = db.cal
bulk = colllection.initialize_ordered_op()
count = 0
for document in collection.find():
    update = dict(zip(fields, [list(set(document[field])) for field in fields])) 
    bulk.find({'_id': document['_id']}).update_one({'$set': update})
    count = count + 1
    if count % 200 == 0:
        bulk.execute()
        bulk = colllection.initialize_ordered_op()

if count > 0:
    bulk.execute()

答案 1 :(得分:2)

待办事项

sudo apt-get install libcurl4-openssl-dev

以便获得curl-config。有了这个,我的系统也很乐意安装PKI

编辑:

edd@max:~$ install.r PKI                           ## install.r is from littler
trying URL 'http://cran.rstudio.com/src/contrib/PKI_0.1-1.tar.gz'
Content type 'application/x-gzip' length 20334 bytes (19 KB)
==================================================
downloaded 19 KB

* installing *source* package ‘PKI’ ...
** package ‘PKI’ successfully unpacked and MD5 sums checked
** libs                                           ## I use ccache; rest standard
ccache gcc -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -O3 -Wall -pipe -pedantic -std=gnu99 -c asn1.c -o asn1.o
ccache gcc -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -O3 -Wall -pipe -pedantic -std=gnu99 -c init.c -o init.o
ccache gcc -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -O3 -Wall -pipe -pedantic -std=gnu99 -c pki-x509.c -o pki-x509.o
ccache gcc -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -O3 -Wall -pipe -pedantic -std=gnu99 -c tools.c -o tools.o
ccache gcc -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o PKI.so asn1.o init.o pki-x509.o tools.o -lssl -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/PKI/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (PKI)

The downloaded source packages are in
        ‘/tmp/downloaded_packages’
edd@max:~$