How to install OpenGL/GLUT libraries
I currently installed ubuntu 11.10 on my acer netbook. I have problem getting some packages I need. I am using the most updated version and have a wifi connection on my campus. This is what my instructor wishes for us to do:
- select Applications/Accessories/Terminal on the Ubuntu desktop
- type
ls /usr/include/GL
ifglut.h gl.hetc are there, great
if not, install itsudo apt-get install libglut3-dev - I then copied
program1.cto the desktop cd desktopgcc -lglut -lGLU program1.cnote l is a lower-case L, which means library in UNIX./a.outto execute
I complete step 2, in which returns:
sudo: ls/brandon/include/GL: command not foundso from here I do the apt-get and try to install it but returns me with this:
E: Unable to locate package libglut3-devDoes this have to do with my connection or is there something I need to be doing on my system for it to find the package and install it. I'm really new to ubuntu and could use some help just getting started.
43 Answers
Your instructions seem to be old, as far as I know glut is provided by the package freeglut3, to get it with the header files for development, install:
sudo apt-get install freeglut3-devwhich should also pull in freeglut3.
To have found this on your own, you could have done:
sudo apt-cache search glutAfter you have installed package freeglut3-dev you can confirm it contains the needed GL files by issuing
dpkg -L freeglut3-devwhich will list contents of the package which include :
/usr/include/GL
/usr/include/GL/freeglut.h
/usr/include/GL/freeglut_ext.h
/usr/include/GL/freeglut_std.h
/usr/include/GL/glut.h
/usr/lib/x86_64-linux-gnu/libglut.a
...
/usr/lib/x86_64-linux-gnu/libglut.so 2 To install OpenGL libraries:
sudo apt-get install mesa-utilsTo install freeGlut:
sudo apt-get install freeglut3-dev Enter the following COMMANDS using Terminal:
sudo apt-get install aptitude
sudo aptitude install freeglut3-devAdditional Notes:If computer asks you if you accept its solution that freeglut3-dev shall NOT be installed due to dependencies, enter "n" to signify "NO".
The computer shall then notify you regarding the downgrade packages action to resolve the dependencies problem. Enter "Y" to signify "YES".
I hope this helps you too.
Thank you.