gpt4 book ai didi

r - CentOS下无法从源代码安装R包

转载 作者:行者123 更新时间:2023-12-04 19:31:30 26 4
gpt4 key购买 nike

我正在使用 CentOS

-bash-4.2$ cat /etc/*release*
CentOS Linux release 7.0.1406 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CentOS Linux release 7.0.1406 (Core)
CentOS Linux release 7.0.1406 (Core)
cpe:/o:centos:centos:7

安装 purrr R package from source .

我正在使用 R CMD INSTALL命令安装此软件包,但出现我不理解且无法克服的错误。有谁知道如何解决这个问题?
-bash-4.2$ R CMD INSTALL purrr_0.1.0.tar.gz 
* installing to library
* installing *source* package ‘purrr’ ...
** pakiet ‘purrr’ został pomyślnie rozpakowany oraz sumy MD5 zostały sprawdzone
** libs
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include -DCOMPILING_DPLYR -I/usr/local/include -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/dplyr/include" -I"/usr/lib64/R/library/BH/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c RcppExports.cpp -o RcppExports.o
In file included from /usr/lib64/R/library/BH/include/boost/tuple/tuple.hpp:33:0,
from /usr/lib64/R/library/BH/include/boost/unordered/detail/allocate.hpp:27,
from /usr/lib64/R/library/BH/include/boost/unordered/detail/buckets.hpp:15,
from /usr/lib64/R/library/BH/include/boost/unordered/detail/table.hpp:10,
from /usr/lib64/R/library/BH/include/boost/unordered/detail/equivalent.hpp:14,
from /usr/lib64/R/library/BH/include/boost/unordered/unordered_map.hpp:17,
from /usr/lib64/R/library/BH/include/boost/unordered_map.hpp:16,
from /usr/lib64/R/library/dplyr/include/dplyr.h:32,
from RcppExports.cpp:4:
/usr/lib64/R/library/BH/include/boost/tuple/detail/tuple_basic.hpp: In function ‘typename boost::tuples::access_traits<typename boost::tuples::element<N, boost::tuples::cons<HT, TT> >::type>::const_type boost::tuples::get(const boost::tuples::cons<HT, TT>&)’:
/usr/lib64/R/library/BH/include/boost/tuple/detail/tuple_basic.hpp:228:45: warning: typedef ‘cons_element’ locally defined but not used [-Wunused-local-typedefs]
typedef BOOST_DEDUCED_TYPENAME impl::type cons_element;
^
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include -DCOMPILING_DPLYR -I/usr/local/include -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/dplyr/include" -I"/usr/lib64/R/library/BH/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c fast-copy.cpp -o fast-copy.o
g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include -DCOMPILING_DPLYR -I/usr/local/include -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/dplyr/include" -I"/usr/lib64/R/library/BH/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c rows.cpp -o rows.o
In file included from /usr/lib64/R/library/BH/include/boost/tuple/tuple.hpp:33:0,
from /usr/lib64/R/library/BH/include/boost/unordered/detail/allocate.hpp:27,
from /usr/lib64/R/library/BH/include/boost/unordered/detail/buckets.hpp:15,
from /usr/lib64/R/library/BH/include/boost/unordered/detail/table.hpp:10,
from /usr/lib64/R/library/BH/include/boost/unordered/detail/equivalent.hpp:14,
from /usr/lib64/R/library/BH/include/boost/unordered/unordered_map.hpp:17,
from /usr/lib64/R/library/BH/include/boost/unordered_map.hpp:16,
from /usr/lib64/R/library/dplyr/include/dplyr.h:32,
from rows.cpp:2:
/usr/lib64/R/library/BH/include/boost/tuple/detail/tuple_basic.hpp: In function ‘typename boost::tuples::access_traits<typename boost::tuples::element<N, boost::tuples::cons<HT, TT> >::type>::const_type boost::tuples::get(const boost::tuples::cons<HT, TT>&)’:
/usr/lib64/R/library/BH/include/boost/tuple/detail/tuple_basic.hpp:228:45: warning: typedef ‘cons_element’ locally defined but not used [-Wunused-local-typedefs]
typedef BOOST_DEDUCED_TYPENAME impl::type cons_element;
^
rows.cpp: In function ‘SEXPREC* subset_slices(const List&)’:
rows.cpp:18:3: error: ‘DataFrameSubsetVisitors’ is not a member of ‘dplyr’
dplyr::DataFrameSubsetVisitors visitors(data);
^
rows.cpp:18:34: error: expected ‘;’ before ‘visitors’
dplyr::DataFrameSubsetVisitors visitors(data);
^
rows.cpp:22:14: error: ‘visitors’ was not declared in this scope
out[i] = visitors.subset(indices[i], classes);
^
rows.cpp: In function ‘SEXPREC* by_row_impl(const List&, SEXP, SEXP, int, const Environment&)’:
rows.cpp:232:3: error: ‘DataFrameSubsetVisitors’ is not a member of ‘dplyr’
dplyr::DataFrameSubsetVisitors visitors(data);
^
rows.cpp:232:34: error: expected ‘;’ before ‘visitors’
dplyr::DataFrameSubsetVisitors visitors(data);
^
rows.cpp:237:16: error: ‘visitors’ was not declared in this scope
SEXP row = visitors.subset(IntegerVector::create(i), classes);
^
make: *** [rows.o] Błąd 1
ERROR: compilation failed for package ‘purrr’

最佳答案

解决方案看起来很简单 https://github.com/hadley/purrr/issues/146
我有一个旧版本的依赖 dplyr包裹。

关于r - CentOS下无法从源代码安装R包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34134786/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com