Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple script for checking libraries #27

Open
hyperclock opened this issue May 20, 2021 · 0 comments
Open

Simple script for checking libraries #27

hyperclock opened this issue May 20, 2021 · 0 comments

Comments

@hyperclock
Copy link

hyperclock commented May 20, 2021

Here's a simple script I use to see if and where libgmp, libmpfr, libmpc, libxml2, libnettle & libzstd are installed. Also checks the python version.

create a file, I call it lib-check.sh and add this:

#!/bin/bash


# Check for some present, absent or missing libraries:
echo -e "\nThe (.la) and (.so) files identified by this script"
echo -e "\n should be all present or all absent,"
echo -e "\n but not only one or two present:"

echo ""
echo -e "\n###################################"
echo -e "\n### CHECKING THE (.la) FILES... ###"
echo -e "\n###################################"
sleep 1s
for lib in lib{gmp,mpfr,mpc,xml2,nettle,zstd}.la; do
  echo $lib: $(if find /usr/lib* -name $lib|
               grep -q $lib;then :;else echo not;fi) found:  /usr/lib* was searched. 
done
unset lib

echo ""
echo -e "\n###################################"
echo -e "\n### CHECKING THE (.so) FILES... ###"
echo -e "\n###################################"
sleep 1s
for lib in lib{gmp,mpfr,mpc,xml2,nettle,zstd}.so*; do
  echo $lib: $(if find /usr/lib* -name $lib|
               grep -q $lib;then :;else echo not;fi) found:  /usr/lib* was searched. 
done
unset lib


echo ""
echo -e "\n##################################"
echo -e "\n### CHECKING PYTHON VERSION... ###"
echo -e "\n##################################"
sleep 1s
python --version | head -n1

python3 --version | head -n1

echo ""
echo ""

then make it executable chmod a+x lib-check.sh

Not a pretty script, but works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant