ubuntu18.04重装R

之前安装后的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 
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

璐璐璐璐璐952

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值