This question already has an answer here:

I'm trying to install glew and freeglut so I can program OpenGL. I have figured out how to fix my make all command but when I type make install I get this message:

Making install in src
make[1]: Entering directory `/home/connor/Documents/freeglut-2.8.1/src'
make[2]: Entering directory `/home/connor/Documents/freeglut-2.8.1/src'
 /bin/mkdir -p '/usr/local/lib'
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libglut.la '/usr/local  /lib'
libtool: install: /usr/bin/install -c .libs/libglut.so.3.9.0 /usr/local/lib/libglut.so.3.9.0
/usr/bin/install: cannot create regular file '/usr/local/lib/libglut.so.3.9.0': Permission denied
make[2]: *** [install-libLTLIBRARIES] Error 1
make[2]: Leaving directory `/home/connor/Documents/freeglut-2.8.1/src'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/connor/Documents/freeglut-2.8.1/src'
make: *** [install-recursive] Error 1

How can I grant the permission?

marked as duplicate by muru, Eliah Kagan, Eric Carvalho, αғsнιη, Seth Oct 21 '14 at 22:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Did you use sudo? So sudo make .... – Cammy_the_block Sep 23 '14 at 1:34
  • Please selected my answer as the chosen answer if it was what you were looking for, to help future guests find the answer faster. – Cammy_the_block Sep 25 '14 at 0:24

You can install glew and freeglut without implementing difficult compilations. They are in Official Ubuntu Repository.

sudo apt-get install freeglut3 libglew1.10 glew-utils
  • I get a bunch of messages saying undefined reference to `glutInit'and every glut, gl and glew thing I use – Connor Williams Sep 23 '14 at 3:12
  • I'm using netbeans for OpenGL – Connor Williams Sep 23 '14 at 3:13

Did you use sudo? So do sudo make ....

sudo stands for Super User DO. Be careful when using sudo because you can do a lot of damage, as you can run any command harmful or not.

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