Skip to content

Instantly share code, notes, and snippets.

@myh-st
Last active May 6, 2022 03:55
Show Gist options
  • Save myh-st/f6a293f38b52d996ef161394265c8a65 to your computer and use it in GitHub Desktop.
Save myh-st/f6a293f38b52d996ef161394265c8a65 to your computer and use it in GitHub Desktop.
Install gcc 4.8.5 from rpm
#!/bin/bash
echo "Please run as root"
echo ""
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=13TU6pnsx1dX5tHOQjgVh2URM9AMqeKcD' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=13TU6pnsx1dX5tHOQjgVh2URM9AMqeKcD" -O gcc48-c++-4.8.5-1.el6.x86_64.rpm && rm -rf /tmp/cookies.txt
rpm -i gcc48-c++-4.8.5-1.el6.x86_64.rpm
mv /usr/bin/gcc48 /usr/bin/gcc && mv /usr/bin/g++48 /usr/bin/g++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment