问题描述
R语音中jqr包安装失败,具体报错:
-----------------------------[ ANTICONF ]-------------------------------
Configuration failed to find the libv8 engine library. Try installing:
* deb: libv8-dev or libnode-dev (Debian / Ubuntu)
* rpm: v8-devel (Fedora, EPEL)
* brew: v8 (OSX)
* csw: libv8_dev (Solaris)
To use a custom libv8, set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
---------------------------[ ERROR MESSAGE ]----------------------------
<stdin>:1:10: fatal error: v8.h: No such file or directory
compilation terminated.
------------------------------------------------------------------------
ERROR: configuration failed for package 'V8'
* removing '/home/liujason/R/x86_64-pc-linux-gnu-library/3.6/V8'
Warning in install.packages :
installation of package 'V8' had non-zero exit status
* installing *source* package 'jqr' ...
** package 'jqr' successfully unpacked and MD5 sums checked
** using staged installation
Using PKG_CFLAGS=
Using PKG_LIBS=-ljq
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libjq was not found.
On Ubuntu 14.04 or 16.04 you can use the PPA:
sudo add-apt-repository -y ppa:opencpu/jq
sudo apt-get update
sudo apt-get install libjq-dev
On other sytems try installing:
* deb: libjq-dev (Debian, Ubuntu 16.10 and up).
* rpm: jq-devel (Fedora, EPEL)
* csw: libjq_dev (Solaris)
* brew: jq (OSX)
If is already installed set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package 'jqr'
* removing '/home/liujason/R/x86_64-pc-linux-gnu-library/3.6/jqr'
Warning in install.packages :
installation of package 'jqr' had non-zero exit status
解决方案
安装依赖环境,以Ubuntu为例:
sudo apt install libjq-dev -y
This article is under CC BY-NC-SA 4.0 license.
Please quote the original link:https://www.liujason.com/article/584.html
Please quote the original link:https://www.liujason.com/article/584.html