运行Rstudio过程中报错&解决方法

1、画图时出现报错

Error in RStudioGD() : 
  Shadow graphics device error: r error 4 (R code execution error)
In addition: Warning message:
In grDevices:::png("/tmp/RtmpLsUDvL/49a035149f9e43f79d778f74be07b567.png",  :
  no png support in this version of R

解决方法

sudo apt install build-essential
sudo apt install gcc
sudo apt install g++
sudo apt install autoconf
sudo apt install libiconv-hook-dev
sudo apt install libmcrypt-dev
sudo apt install libxml2-dev
sudo apt install libmysqlclient-dev
sudo apt install libcurl4-openssl-dev
sudo apt install libjpeg62-dev
sudo apt install libpng12-dev

cd R-3.4.4
./configure --prefix=/home/felicia/Downloads/bio_software/R-3.4.4 --enable-R-shlib --with-libpng --with-jpeglib --with-libtiff --with-cairo
make
make install

2、安装Cairo库出现报错解决方法

sudo apt-get install libcairo2-dev 
sudo apt-get install libxt-dev  

install.packages("Cairo")

3、画图时出现报错

 Error in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y
 X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 11 could not be loaded

解决方法

sudo apt install xfonts-base
sudo apt install xfonts-100dpi
sudo apt install xfonts-75dpi
sudo apt installxfonts-cyrillic

4、安装plotly包报错

ERROR: configuration failed for package ‘openssl’
* removing ‘/home/felicia/R/x86_64-pc-linux-gnu-library/3.4/openssl’
Warning in install.packages :
  installation of package ‘openssl’ had non-zero exit status
ERROR: dependency ‘openssl’ is not available for package ‘httr’
* removing ‘/home/felicia/R/x86_64-pc-linux-gnu-library/3.4/httr’
Warning in install.packages :
  installation of package ‘httr’ had non-zero exit status

解决方法

sudo apt install libssl-dev

results matching ""

    No results matching ""