sdkessler
sdkessler

Reputation: 9

How to install SDL2 on linux RHEL in other directories?

I can't install SDL2 on my uni lab computers running Red Hat linux OS due to insufficient permissions when I tried to install them the normal way, probably because I cant install to system files. Can someone guide me on how to install the SDL libraries on other directories(desktop etc) where I have permission and then link my files to them (makefiles etc)?

Using g++ compiler.

Upvotes: 0

Views: 642

Answers (1)

Look for auto install SDL2 on a CentOS (RHEL) system: https://gist.github.com/JPEGtheDev/91369e571069f0db38c2

Auto install SDL2 on a CentOS system:

#!/bin/bash
if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root" 
   exit 1
fi
cd /tmp
hg clone https://hg.libsdl.org/SDL SDL;
cd SDL;
mkdir build;
cd build;
../configure
make;
make install;
sudo ln -s /usr/local/lib/libSDL2-2.0.so.0 /usr/lib64/libSDL2-2.0.so.0

Upvotes: 1

Related Questions