Closed diwashrestha closed 5 years ago
Which OS is this? Please include sessionInfo()
OS : ubuntu 18.04 sessionInfo()
R version 3.5.1 (2018-07-02) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.2 LTS
Matrix products: default BLAS: /opt/microsoft/ropen/3.5.1/lib64/R/lib/libRblas.so LAPACK: /opt/microsoft/ropen/3.5.1/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=bho_NP
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=bho_NP LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=bho_NP LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=bho_NP LC_IDENTIFICATION=C
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] RevoUtils_11.0.1 RevoUtilsMath_11.0.0
loaded via a namespace (and not attached): [1] compiler_3.5.1 tools_3.5.1 yaml_2.2.0
You're better off using the real R instead of microsoft R. Try this:
sudo add-apt-repository ppa:marutter/rrutter3.5
apt-get update
apt-get install r-base-dev
I installed R 3.5.2 but got same error.
downloaded 16 KB
ERROR: configuration failed for package ‘protolite’
The downloaded source packages are in ‘/tmp/RtmpJ7JQOJ/downloaded_packages’
sessionInfo() R version 3.5.2 (2018-12-20) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.2 LTS
Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3 LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=bho_NP
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=bho_NP LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=bho_NP LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=bho_NP LC_IDENTIFICATION=C
attached base packages: [1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached): [1] compiler_3.5.2 tools_3.5.2 yaml_2.2.0
Can you please run the following code and show me the output:
R_HOME=$(R RHOME)
CXXCPP=$(${R_HOME}/bin/R CMD config CXXCPP)
CXXFLAGS=$(${R_HOME}/bin/R CMD config CXXFLAGS)
CPPFLAGS=$(${R_HOME}/bin/R CMD config CPPFLAGS)
PKG_TEST_HEADER="<google/protobuf/message.h>"
echo "#include $PKG_TEST_HEADER" | ${CXXCPP} ${CPPFLAGS} ${PKG_CFLAGS} ${CXXFLAGS} -xc++ - > /dev/null
where should i run this code in terminal or r console?
In the terminal
Without sudo:
diwash@diwash-Lenovo-G50-80:~$ R_HOME=$(R RHOME) diwash@diwash-Lenovo-G50-80:~$ CXXCPP=$(${R_HOME}/bin/R CMD config CXXCPP) diwash@diwash-Lenovo-G50-80:~$ CXXFLAGS=$(${R_HOME}/bin/R CMD config CXXFLAGS) diwash@diwash-Lenovo-G50-80:~$ CPPFLAGS=$(${R_HOME}/bin/R CMD config CPPFLAGS) diwash@diwash-Lenovo-G50-80:~$ PKG_TEST_HEADER="<google/protobuf/message.h>" diwash@diwash-Lenovo-G50-80:~$ echo "#include $PKG_TEST_HEADER" | ${CXXCPP} ${CPPFLAGS} ${PKG_CFLAGS} ${CXXFLAGS} -xc++ - > /dev/null
You have a broken version of protobuf in /usr/local
that you probably compiled from source. This version probably masks the real libprotobuf-dev
. Remove the broken version by doing:
sudo rm -Rf /usr/local/include/google
sudo rm -f /usr/local/lib/libprotobuf*
I installed libprotobuf-dev but still get this error.