之前安装后的Rstudio一直报错
Error in RStudioGD() :
Shadow graphics device error: r error 4 (R code execution error)
Warning message:
In grDevices:::png("...******.......", :
could not open connection to X11 display
> capabilities()
jpeg png tiff tcltk X11 aqua http/ftp
FALSE FALSE FALSE FALSE FALSE FALSE TRUE
发现jpeg,png,tiff,X11均为关闭状态
应该是安装R时编译有问题,所以重装
wget https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/base/R-4/R-4.1.0.tar.gz
...
2021-12-06 19:32:16 (13.9 MB/s) - ‘R-4.1.0.tar.gz’ saved [33173947/33173947]
tar -xf R-4.1.0.tar.gz
cd /root/R-4.1.0
./configure --with-readline=no --with-x --enable-R-shlib --with-cairo --with-libpng
..
checking for BZ2_bzlibVersion in -lbz2... no
checking whether bzip2 support suffices... configure: error: bzip2 library and headers are required
报错error: bzip2 library and headers are required
# 搜索bzip2包
apt-cache search bzip2 | grep library
libarchive-dev - Multi-format archive and compression library (development files)
libarchive13 - Multi-format archive and compression library (shared library)
libbz2-1.0 - high-quality block-sorting file compressor library - runtime
libbz2-dev - high-quality block-sorting file compressor library - development
liblzma-dev - XZ-format compression library - development files
liblzma5 - XZ-format compression library
libperl5.26 - shared Perl library
cl-chipz - library for decompressing DEFLATE and BZIP2 data
libbz2-ocaml - OCaml bindings for the bzip2 compression library
libbz2-ocaml-dev - OCaml bindings for the bzip2 compression library
libcompress-bzip2-perl - Perl interface to Bzip2 compression library
libcompress-raw-bzip2-perl - low-level interface to bzip2 compression library
libghc-bzlib-dev - Haskell bindings to the bzip2 library
libghc-bzlib-doc - Haskell bindings to the bzip2 library; documentation
libghc-bzlib-prof - Haskell bindings to the bzip2 library; profiling libraries
libjbzip2-java - bzip2 compression/decompression library
python-bz2file - Python library for reading and writing bzip2-compressed files
python-hachoir-metadata - Program