Travis
Travis

Reputation: 39

Unable to locate package GLFW on Linux Mint

I have been trying to install GLFW and GLFW3, using Terminal to install:

sudo apt-get install GLFW
sudo apt-get install GLFW3

Whenever I do so, I get results such as:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package glfw3

EDIT: No matter what I try, my program encounters:

/home/myusername/Desktop/basic_window.cpp:11:21: fatal error: GL/glfw.h: No such file or directory
 #include <GL/glfw.h>
                     ^
compilation terminated.

Upvotes: 2

Views: 10401

Answers (4)

siruku6
siruku6

Reputation: 508

Though, it is not on Linux Mint, but Debian Linux (Debian GNU/Linux 12), I was able to install glfw like this.

$ apt-get update
$ apt-get install libglfw3 libglfw3-dev

Environment Information

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm

Other references

Upvotes: 0

jww
jww

Reputation: 102376

I have been trying to install GLFW and GLFW3, using Terminal to install...

On Mint 17, it looks like you need to install libglfw2. So perform a sudo apt-get install libglfw2.

If you plan on developing against it, then install libglfw-dev instead. Notice the lack of a version number.

If interested, perform apt-cache search glfw

Upvotes: 3

Wyzard
Wyzard

Reputation: 34571

In Debian-based systems such as Ubuntu and Mint, library packages typically have names that begin with "lib", and development headers (for compiling new programs that use the library) are in a separate package whose name ends with "-dev".

Ubuntu 14.04 has GLFW 2 packaged as libglfw2 and libglfw-dev. Mint doesn't seem to have those packages, but you can probably use the Ubuntu ones since Mint 17 is based on Ubuntu 14.04.

GLFW 3 isn't in Ubuntu 14.04, but it looks like it'll be in 14.10 (as libglfw3 and libglfw3-dev).

Unless you really need GLFW 3 specifically, you're probably better off sticking with the packaged GLFW 2. Packages get easy automatic upgrades; compiling stuff "by hand" is a good way to end up with lots of cruft in your system with no automatic upgrade or uninstall.

Upvotes: 2

user3835277
user3835277

Reputation:

  • Download GLFW source packages from their website.
  • Extract the folder glfw-3.0.4 from the tarball
  • Open console
  • Navigate to the folder you just extracted and go inside of it using cd
  • Type cmake . (be sure you include the dot)

If cmake . fails, then type the following as root:

  • apt-get install cmake

If you don't think you're root then type the following:

  • sudo apt-get install cmake

If that doesn't work then type the following as root, or add sudo if you're not root:

  • apt-get install build-essential cmake

Once you have cmake installed, navigate back to the folder and try cmake . again.

Upvotes: 1

Related Questions