[问题类型]:
程式咨询(我想用R 做某件事情,但是我不知道要怎么用R 写出来)
经验咨询(我想用R 连接某些数据库,请问大家的经验)
[软件熟悉度]:
使用者(已经有用R 做过不少作品)
[问题叙述]:
我想要试着玩玩看在Google Cloud Platform上面架Shiny Server,
但遇到不少问题,还在一个个解决中,
现在遇到的状况是安装leaflet和rgeos这两个套件都会失败。
[程式范例]:
```shell
sudo su - -c "R -e \"install.packages(c('rgeos', 'leaflet'), repo='https://cloud.r-project.org/')\""
```
大概从这里开始有问题:
/bin/sh: libpng-config: command not found
read.c:3:17: fatal error: png.h: No such file or directory
#include <png.h>
^
compilation terminated.
make: *** [read.o] Error 1
ERROR: compilation failed for package ‘png’
* removing ‘/usr/lib64/R/library/png’
* installing *source* package ‘rgeos’ ...
** package ‘rgeos’ successfully unpacked and MD5 sums checked
configure: CC: gcc -m64 -std=gnu99
configure: CXX: g++ -m64
configure: rgeos: 0.3-26
checking for /usr/bin/svnversion... no
configure: svn revision: 560
checking for geos-config... no
no
configure: error: geos-config not found or not executable.
ERROR: configuration failed for package ‘rgeos’
* removing ‘/usr/lib64/R/library/rgeos’
ERROR: dependency ‘png’ is not available for package ‘leaflet’
* removing ‘/usr/lib64/R/library/leaflet’
The downloaded source packages are in
‘/tmp/RtmpboBa5A/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages(c("rgeos", "leaflet"), repo = "https://cloud.r-project.org/") :
installation of package ‘png’ had non-zero exit status
2: In install.packages(c("rgeos", "leaflet"), repo = "https://cloud.r-project.org/") :
installation of package ‘rgeos’ had non-zero exit status
3: In install.packages(c("rgeos", "leaflet"), repo = "https://cloud.r-project.org/") :
installation of package ‘leaflet’ had non-zero exit status
[环境叙述]:
R version 3.4.4 (2018-03-15)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.4
[关键字]:
CentOS, leaflet, rgeos