Skip to content

Commit 253a8a6

Browse files
authored
Merge pull request #3855 from Countly/ubuntu-22-support-fix
Fix GCC-8 support for ubuntu 22
2 parents 82d586e + 5fc888c commit 253a8a6

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

bin/countly.install_ubuntu.sh

+8-13
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,20 @@ sudo apt-get update
1818

1919
sudo apt-get -y install wget build-essential libkrb5-dev git sqlite3 unzip bzip2 shellcheck
2020

21-
if [[ "$UBUNTU_YEAR" = "22" && ! -h /usr/bin/python ]]; then
21+
if [[ "$UBUNTU_YEAR" = "22" ]]; then
2222
sudo apt-get -y install python2 python2-dev
23-
sudo ln -s /usr/bin/python2.7 /usr/bin/python #absult path
24-
sudo ln -s /usr/bin/python2-config /usr/bin/python-config
23+
if [[ ! -h /usr/bin/python ]]; then
24+
sudo ln -s /usr/bin/python2.7 /usr/bin/python
25+
sudo ln -s /usr/bin/python2-config /usr/bin/python-config
26+
fi
2527
else
2628
sudo apt-get -y install python
2729
fi
2830

29-
#Install GCC > 7 version
31+
#Install GCC && G++> 7 version
3032
sudo apt-get -y install software-properties-common
31-
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
32-
sudo apt-get -y install build-essential gcc-8
33-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8
34-
sudo update-alternatives --set gcc "/usr/bin/gcc-8"
35-
36-
#Install G++ > 7 version
37-
sudo apt-get -y install build-essential g++-8
38-
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 8
39-
sudo update-alternatives --set g++ "/usr/bin/g++-8"
33+
sudo apt-get -y install build-essential
34+
sudo apt-get install gcc g++ make
4035

4136
#Install dependancies required by the puppeteer
4237
sudo apt-get -y install libgbm-dev libgbm1 gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget

0 commit comments

Comments
 (0)