小白在使用asy作图时,发现编译时出现了问题,问题如下:

$ asy -V -f pdf 2-10.asyasy: error while loading shared libraries: libglut.so.3: cannot open shared object file: No such file or directory

提示缺少libglut.so.3的库,于是就搜索了一下关于glut相关的包,

$ sudo apt-cache search glut |grep glutfreeglut3 - OpenGL Utility Toolkitfreeglut3-dbg - OpenGL Utility Toolkit debugging informationfreeglut3-dev - OpenGL Utility Toolkit development filesmgltools-mglutil - Molecular Graphics Laboratory utility collectioncelestia-glut - real-time visual space simulation (GLUT frontend)libghc-glut-dev - Haskell GLUT binding for GHClibghc-glut-doc - Haskell GLUT binding for GHC; documentationlibghc-glut-prof - Haskell GLUT binding for GHC; profiling librarieslibhugs-glut-bundled - A binding for the OpenGL Utility Toolkitlibkwinactiveglutils1abi3 - library used by accellaration for the KDE window manager Activelibkwinglutils1abi3 - library with OpenGL utilities for the KDE window managerlibmgl-glut7.0.0 - library for scientific graphs (glut interface for windows)libtaoframework-freeglut-cil-dev - Tao CLI binding for freeglut - development fileslibtaoframework-freeglut2.4-cil - Tao CLI binding for freeglut

小白打算安装顺序一个一个的安装,于是依次安装,看是否可以解决问题,

$ sudo apt-get install freeglut3Reading package lists... DoneBuilding dependency tree       Reading state information... DoneThe following NEW packages will be installed:  freeglut30 upgraded, 1 newly installed, 0 to remove and 13 not upgraded.Need to get 97.5 kB of archives.After this operation, 342 kB of additional disk space will be used.Get:1 http://cn.archive.ubuntu.com/ubuntu/ trusty/main freeglut3 amd64 2.8.1-1 [97.5 kB]Fetched 97.5 kB in 0s (145 kB/s)     Selecting previously unselected package freeglut3:amd64.(Reading database ... 663456 files and directories currently installed.)Preparing to unpack .../freeglut3_2.8.1-1_amd64.deb ...Unpacking freeglut3:amd64 (2.8.1-1) ...Setting up freeglut3:amd64 (2.8.1-1) ...Processing triggers for libc-bin (2.19-0ubuntu6.6) ...

再次运行asy程序,解决了问题。