2

I need to install Grass GIS on my Amazon Linux 2 AMI instance which is of type t2.small During the configuration of Grass GIS it stopped with

checking for GL/gl.h... no
configure: error: *** Unable to locate OpenGL includes.

To install OpenGL and/or its includes, I've tried following (all with sudo)

yum install libx11-dev
yum install libx11
yum install libX11
yum install libX11-dev
yum install libglu1-mesa-dev
yum install freeglut-devel
yum install freeglut3-dev
yum install mesa-common-dev

As far as I can remember, all of them returned a message of this kind (message translated into English)

amzn2-core
no package named libX11-dev which can be used

Question #1

I kept on searching and found this post which seems to say that in order to use OpenGL, the instance type should be G2 Is that right?

If that's the case then I presume that the G2 type has a capable graphics hardware whereas my instance t2.small (or shortlyT2 ?) is likely to have no capable graphics hardware.

lspci | grep VGA gives: 00:02.0 VGA compatible controller: Cirrus Logic GD 5446

Question #2

Is it in any way possible to install OpenGL on t2.type (whether using yum or using the source codes and building OpenGL from scratch) ?

1
  • 1
    I generally find Ubuntu is much easier to install software on than Amazon Linux, the repos are more complete and up to date.
    – Tim
    Feb 8, 2021 at 20:31

1 Answer 1

3

Here we see compilation failed because a C include file was missing:

checking for GL/gl.h... no
configure: error: *** Unable to locate OpenGL includes.

You should use yum to search for the package containing the missing file.

[ec2-user@localhost ~]$ sudo yum provides */GL/gl.h
Loaded plugins: langpacks, priorities, update-motd
mesa-libGL-devel-17.0.1-6.20170307.amzn2.x86_64 : Mesa libGL development package
Repo        : amzn2-core
Matched from:
Filename    : /usr/include/GL/gl.h



mesa-libGL-devel-17.2.3-8.20171019.amzn2.0.1.x86_64 : Mesa libGL development
                                                    : package
Repo        : amzn2-core
Matched from:
Filename    : /usr/include/GL/gl.h



mesa-libGL-devel-17.2.3-8.20171019.amzn2.0.4.x86_64 : Mesa libGL development
                                                    : package
Repo        : amzn2-core
Matched from:
Filename    : /usr/include/GL/gl.h



mesa-libGL-devel-18.3.4-5.amzn2.0.1.x86_64 : Mesa libGL development package
Repo        : amzn2-core
Matched from:
Filename    : /usr/include/GL/gl.h

So now you can see the package name is mesa-libGL-devel and you can install it.

Note that without GPU hardware attached to the VM, this won't buy you much. You can certainly compile the software but you'll want an instance with a GPU in order to run it without having to wait forever for software rendering. (The Cirrus you see there is an emulated 1996-era SVGA card which is good for basic video and little else. It basically exists only for the relatively new Screenshot feature, and that level of video is about all it can do.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .