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

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

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
sudo  apt-cache search glut | grep  glut
freeglut3 - OpenGL Utility Toolkit
freeglut3-dbg - OpenGL Utility Toolkit debugging information
freeglut3-dev - OpenGL Utility Toolkit development files
mgltools-mglutil - Molecular Graphics Laboratory utility collection
celestia-glut - real- time  visual space simulation (GLUT frontend)
libghc-glut-dev - Haskell GLUT binding  for  GHC
libghc-glut-doc - Haskell GLUT binding  for  GHC; documentation
libghc-glut-prof - Haskell GLUT binding  for  GHC; profiling libraries
libhugs-glut-bundled - A binding  for  the OpenGL Utility Toolkit
libkwinactiveglutils1abi3 - library used by accellaration  for  the KDE window manager Active
libkwinglutils1abi3 - library with OpenGL utilities  for  the KDE window manager
libmgl-glut7.0.0 - library  for  scientific graphs (glut interface  for  windows)
libtaoframework-freeglut-cil-dev - Tao CLI binding  for  freeglut - development files
libtaoframework-freeglut2.4-cil - Tao CLI binding  for  freeglut


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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
sudo  apt-get  install  freeglut3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
   freeglut3
0 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程序,解决了问题。