在程序员之友论坛找到了解决方案:https://stackoverflow.com/questions/29478686/troubles-installing-rgl-on-ubuntu
稍微有点麻烦:
sudo add-apt-repository ppa:marutter/rrutter
sudo apt-get update
sudo apt-get install r-cran-rgl
sudo apt-get install -y xorg
sudo apt-get install -y libx11-dev
sudo apt-get install -y libglu1-mesa-dev
sudo apt-get install -y libatlas-base-dev
sudo apt-get install -y gfortran
sudo apt-get install -y libblas-dev liblapack-dev
sudo apt-get install -y libblas-dev
sudo apt install -y python-autopep8
sudo apt install -y libftgl2 libcgal-dev libglu1-mesa-dev libglu1-mesa-dev libx11-dev libfreetype6-dev
sudo apt-get install -y libcgal-dev libglu1-mesa-dev libglu1-mesa-dev
install.packages("digest")
install.packages("xtable")
install.packages("rgl")