echo " #include<stdio.h> #include<openssl/ssl.h> int main() { return 0; } " > openssltest.c gcc -o openssltest openssltest.c if [ $? -eq 0 ]; then rm openssltest* else rm openssltest* echo -e " 33[031mYour system have not installed libssl-dev ,command below will be run: 33[0m" echo "sudo apt-get install -y libssl-dev" sudo apt-get install -y libssl-dev if [ $? -ne 0 ]; then echo -e " 33[031mError: Cannot install libssl-dev 33[0m" exit 1 fi fi
echo "
#include<stdio.h>
#include<openssl/ssl.h>
int main()
{
return 0;
}
" > openssltest.c
gcc -o openssltest openssltest.c
if [ $? -eq 0 ]; then
rm openssltest*
else
rm openssltest*
echo -e " 33[031mYour system have not installed libssl-dev ,command below will be run: 33[0m"
echo "sudo apt-get install -y libssl-dev"
sudo apt-get install -y libssl-dev
if [ $? -ne 0 ]; then
echo -e " 33[031mError: Cannot install libssl-dev 33[0m"
exit 1
fi
fi