Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit cad8142

Browse files
authored
fix install deps for centos (#1084)
* fix install deps for centos * install glibc-2.18 on centos * fix install_svt_hevc
1 parent c50db25 commit cad8142

File tree

5 files changed

+44
-7
lines changed

5 files changed

+44
-7
lines changed

scripts/detectOS.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
#
33
# http://eh.meklu.org/script/meksysinfo
44

5-
lsb_release >/dev/null 2>/dev/null
6-
if [ $? = 0 ]
5+
lsb_release_ret=0
6+
lsb_release >/dev/null 2>/dev/null || lsb_release_ret=$?
7+
if [ $lsb_release_ret = 0 ]
78
then
89
lsb_release -ds | sed 's/^\"//g;s/\"$//g'
910
# a bunch of fallbacks if no lsb_release is available

scripts/installCentOSDeps.sh

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ installYumDeps(){
3939
${SUDO} yum install centos-release-scl -y
4040
${SUDO} yum install devtoolset-7-gcc* -y
4141
${SUDO} yum install docbook2X -y
42+
${SUDO} yum install libffi-devel -y
4243
}
4344

4445
installRepo(){
@@ -65,12 +66,26 @@ install_mediadeps(){
6566

6667
install_glibc(){
6768
cd $LIB_DIR
68-
wget -c http://gnu.mirrors.pair.com/gnu/libc/glibc-2.14.tar.xz
69-
tar xvf glibc-2.14.tar.xz
70-
cd glibc-2.14
69+
wget http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz
70+
tar zxf glibc-2.18.tar.gz
71+
cd glibc-2.18
7172
mkdir -p build && cd build/
72-
../configure --prefix=$PREFIX_DIR
73-
make -j4 -s && make install
73+
../configure --prefix=/usr
74+
make -j4 && make install
75+
}
76+
77+
install_python3(){
78+
if [ -f /usr/bin/python3 ]; then
79+
echo "python3 already installed." && return 0
80+
fi
81+
cd $LIB_DIR
82+
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
83+
tar xvf Python-3.7.0.tar.xz
84+
cd Python-3.7.0
85+
./configure prefix=/usr/local/python3
86+
make && make install
87+
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
88+
cd ../ && rm -r Python-3.7*
7489
}
7590

7691
cleanup(){

scripts/installCommonDeps.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,11 @@ install_svt_hevc(){
513513
pushd SVT-HEVC >/dev/null
514514
git checkout v1.3.0
515515

516+
if [[ "$OS" =~ .*centos.* ]]
517+
then
518+
source scl_source enable devtoolset-7
519+
fi
520+
516521
mkdir -p build
517522
pushd build >/dev/null
518523
cmake -DCMAKE_C_FLAGS="-std=gnu99" -DCMAKE_INSTALL_PREFIX=${PREFIX_DIR} ..

scripts/installDeps.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,20 @@ then
7979
[Yy]* ) install_boost;;
8080
* ) install_boost;;
8181
esac
82+
83+
read -p "Installing glibc-2.18 [Yes/no]" yn
84+
case $yn in
85+
[Nn]* ) ;;
86+
[Yy]* ) install_glibc;;
87+
* ) install_glibc;;
88+
esac
89+
90+
read -p "Installing python3 [Yes/no]" yn
91+
case $yn in
92+
[Nn]* ) ;;
93+
[Yy]* ) install_python3;;
94+
* ) install_python3;;
95+
esac
8296
elif [[ "$OS" =~ .*ubuntu.* ]]
8397
then
8498
. installUbuntuDeps.sh

scripts/installDepsUnattended.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ then
6565
installRepo
6666
installYumDeps
6767
install_boost
68+
install_glibc
69+
install_python3
6870
fi
6971
elif [[ "$OS" =~ .*ubuntu.* ]]
7072
then

0 commit comments

Comments
 (0)