KEGG通路分析R包安装失败解决-pathview

丑逼 2018-07-01

1. 安装

> source("http://bioconductor.org/biocLite.R")
Bioconductor version 3.6 (BiocInstaller 1.28.0), ?biocLite for help
A new version of Bioconductor is available after installing the most recent version of R; see http://bioconductor.org/install
# 设置国内华科镜像
> options(BioC_mirror="http://mirrors.ustc.edu.cn/bioc/")
> biocLite("pathview")
1
2
3
4
5
6
7

2. 安装报错显示

缺一下软件,需要在ubuntu下的系统进行安装,而不是实用R来安装补充

* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lcurl
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libcurl was not found. Try installing:
 * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
 * rpm: libcurl-devel (Fedora, CentOS, RHEL)
 * csw: libcurl_dev (Solaris)
If libcurl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘curl’
* removing ‘/home/toucan/R/x86_64-pc-linux-gnu-library/3.4/curl’
* installing *source* package ‘openssl’ ...
** package ‘openssl’ successfully unpacked and MD5 sums checked
Using PKG_CFLAGS=
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because openssl was not found. Try installing:
 * deb: libssl-dev (Debian, Ubuntu, etc)
 * rpm: openssl-devel (Fedora, CentOS, RHEL)
 * csw: libssl_dev (Solaris)
 * brew: [email protected] (Mac OSX)
If openssl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a openssl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘openssl’
* removing ‘/home/toucan/R/x86_64-pc-linux-gnu-library/3.4/openssl’
* installing *source* package ‘XML’ ...
** package ‘XML’ successfully unpacked and MD5 sums checked
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for sed... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking for xml2-config... no
Cannot find xml2-config
ERROR: configuration failed for package ‘XML’
* removing ‘/home/toucan/R/x86_64-pc-linux-gnu-library/3.4/XML’
ERROR: dependencies ‘curl’, ‘openssl’ are not available for package ‘httr’
* removing ‘/home/toucan/R/x86_64-pc-linux-gnu-library/3.4/httr’
ERROR: dependency ‘XML’ is not available for package ‘KEGGgraph’
* removing ‘/home/toucan/R/x86_64-pc-linux-gnu-library/3.4/KEGGgraph’
ERROR: dependency ‘httr’ is not available for package ‘KEGGREST’
* removing ‘/home/toucan/R/x86_64-pc-linux-gnu-library/3.4/KEGGREST’
ERROR: dependencies ‘KEGGgraph’, ‘XML’, ‘KEGGREST’ are not available for package ‘pathview’
* removing ‘/home/toucan/R/x86_64-pc-linux-gnu-library/3.4/pathview’
The downloaded source packages are in
 ‘/tmp/RtmphFHfs8/downloaded_packages’
installation path not writeable, unable to update packages: backports, bindr, bindrcpp, data.table, dplyr, Formula, highr, htmlTable,
 htmlwidgets, knitr, munsell, pillar, purrr, Rcpp, reshape2, rlang, stringi, stringr, tibble, tidyr, utf8, viridis, yaml, cluster,
 foreign, MASS, Matrix, mgcv, nlme, survival
Warning messages:
1: In install.packages(pkgs = doing, lib = lib, ...) :
 installation of package ‘curl’ had non-zero exit status
2: In install.packages(pkgs = doing, lib = lib, ...) :
 installation of package ‘openssl’ had non-zero exit status
3: In install.packages(pkgs = doing, lib = lib, ...) :
 installation of package ‘XML’ had non-zero exit status
4: In install.packages(pkgs = doing, lib = lib, ...) :
 installation of package ‘httr’ had non-zero exit status
5: In install.packages(pkgs = doing, lib = lib, ...) :
 installation of package ‘KEGGgraph’ had non-zero exit status
6: In install.packages(pkgs = doing, lib = lib, ...) :
 installation of package ‘KEGGREST’ had non-zero exit status
7: In install.packages(pkgs = doing, lib = lib, ...) :
 installation of package ‘pathview’ had non-zero exit status
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87

3. 安装系统依赖包,实用R来安装,报错

> install.packages("XML")
Installing package into ‘/home/toucan/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/XML_3.98-1.11.tar.gz'
Content type 'application/x-gzip' length 1599533 bytes (1.5 MB)
==================================================
downloaded 1.5 MB
* installing *source* package ‘XML’ ...
** package ‘XML’ successfully unpacked and MD5 sums checked
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for sed... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking for xml2-config... no
Cannot find xml2-config
ERROR: configuration failed for package ‘XML’
* removing ‘/home/toucan/R/x86_64-pc-linux-gnu-library/3.4/XML’
Warning in install.packages :
 installation of package ‘XML’ had non-zero exit status
The downloaded source packages are in
 ‘/tmp/RtmphFHfs8/downloaded_packages’
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

4. 实用ubuntu下进行安装,最终所有安装成功

解决方法:

1. 安装

$sudo apt-get install r-cran-xml
1

无效报错依旧

  1. 安装
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libxml2-dev
# 或者
sudo apt-get install libcurl4-openssl-dev libxml2-dev
1
2
3
4
5
  1. 加载库成功,说明缺上面的包,问题已解决
library(XML)
1
2
  1. 继续根据报错安装
sudo apt-get install libssl-dev
1
2
  1. 最终安装成功
library("pathview")

KEGG通路分析R包安装失败解决-pathview

相关推荐