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:

  1. select Applications/Accessories/Terminal on the Ubuntu desktop
  2. type ls /usr/include/GL
    if glut.h gl.h etc are there, great
    if not, install it sudo apt-get install libglut3-dev
  3. I then copied program1.c to the desktop
  4. cd desktop
  5. gcc -lglut -lGLU program1.c note l is a lower-case L, which means library in UNIX
  6. ./a.out to execute

I complete step 2, in which returns:

sudo: ls/brandon/include/GL: command not found

so from here I do the apt-get and try to install it but returns me with this:

E: Unable to locate package libglut3-dev

Does 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.

  • Step 2 was to type the command ls /usr/include/GL and not ls/brandon/include/GL. Not your user name but usr. There is a space between ls and the path /usr/include/GL. Because there is no space the terminal is seeing what you typed as a single command which does not exist and not a command followed by an option. You need to find out if there are files in the GL directory such as glut.h, gl.h and the rest. To get more information about the ls command type man ls - regards – grahammechanical Jan 17 '12 at 1:38
  • Thank you, but I still seem to have a problem, upon entering the correct command It responds with: ls: cannot access /usr/include/GL: No such file or directory. I don't know what could be the problem. – Brandon Jacobs Jan 17 '12 at 1:42
  • I would like to say that as good as this site is you would do better on Ubuntu forums at ubuntu.com because here there can be no discussion. Just a specific question and a definite answer. Whereas on the forums we can post back and forth. – grahammechanical Jan 17 '12 at 1:45
  • 1
    Rather than back and forthing can you just edit your question with the information of the steps you've done so far? – Jorge Castro Jan 17 '12 at 1:58

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-dev

freeglut3-devInstall freeglut3-dev

which should also pull in freeglut3Install freeglut3.

To have found this on your own, you could have done:

sudo apt-cache search glut

After you have installed package freeglut3-dev you can confirm it contains the needed GL files by issuing

dpkg -L freeglut3-dev

which will list contents of the package which include :

  • 1
    Also install sudo apt-get install libxmu-dev libxi-dev – Dhiren Hamal Sep 26 '19 at 10:04

To install OpenGL libraries:

sudo apt-get install mesa-utils

To install freeGlut:

sudo apt-get install freeglut3-dev

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.