ldconfig -pでインストールされているライブラリを出力してくれるので、次のようにその出力をパイプしてgrepする[1]
ldconfig -p
grep
/sbin/ldconfig -p | grep libjpeg