To do this in a distro-independent* fashion you can use ldconfig with grep, like this:
ldconfig -p | grep libjpeg
If libjpeg is not installed, there will be no output. If it is installed, you will get a line for each version available.
Replace libjpeg by any library you want, and you have a generic, distro-independent* way of checking for library availability.
If for some reason the path to ldconfig is not set, you can try to invoke it using its full path, usually /sbin/ldconfig
.
**99% of the times*
Related Posts:
- Chmod 777 to a folder and all contents [duplicate]
- Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running?
- How do I grep recursively?
- “Couldn’t find a file descriptor referring to the console” on Ubuntu bash on Windows
- How can I recursively find all files in current and subfolders based on wildcard matching?
- How to install grub after installing Windows 10
- -bash: syntax error near unexpected token `newline’ for display command
- SSH using python script
- Changing the resolution of a VNC session in linux
- mysql_config not found when installing mysqldb python interface
- Linux error while loading shared libraries: cannot open shared object file: No such file or directory
- Shell command to tar directory excluding certain files/folders
- QEMU: /bin/sh: can’t access tty; job control turned off
- Meaning of exit status 1 returned by linux command
- How does “cat << EOF" work in bash?
- X11 forwarding request failed on channel 0
- What is difference between arm64 and armhf?
- Extract file basename without path and extension in bash
- How to change permissions for a folder and its subfolders/files in one step
- mysql_config not found when installing mysqldb python interface
- linux command to get size of files and directories present in a particular folder?
- ./configure : /bin/sh^M : bad interpreter
- How to count lines in a document?
- What does `set -x` do?
- Compile the Fortran program in Windows using gfortran
- How can I set the ‘backend’ in matplotlib in Python?
- Yum fails with – There are no enabled repos.
- How to get the process ID to kill a nohup process?
- Unable to establish SSL connection upon wget on Ubuntu 14.04 LTS
- Writing a simple shell in C using fork/execvp
- Using ls to list directories and their total sizes
- configure: error: cannot run C compiled programs
- tar: add all files and directories in current directory INCLUDING .svn and so on
- What does set -e mean in a bash script?
- What does set -e mean in a bash script?
- “find: paths must precede expression:” How do I specify a recursive search that also finds files in the current directory?
- Pipe to/from the clipboard in a Bash script
- Difference between exec, execvp, execl, execv?
- what does -zxvf mean in tar -zxvf filename?
- Retrieve last 100 lines logs
- Configuring Apache for localhost
- Restarting cron after changing crontab file?
- cd into directory without having permission
- Android – Command not found
- EC2 ssh Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
- What does ‘bash -c’ do?
- How do I know the script file name in a Bash script?
- WordPress can’t find temporary folder, but folder it’s looking at has correct permissions
- WordPress cloning issue
- How to run a server on port 80 as a normal user on Linux?
- Copying a large directory tree locally? cp or rsync?
- Check if port is open or closed on a Linux server?
- Moving an already-running process to Screen
- When does `cron.daily` run?
- Permission denied (publickey). SSH from local Ubuntu to Amazon EC2 server
- How to run a command multiple times, using bash shell?
- How to reconnect to a disconnected ssh session
- What does a + mean at the end of the permissions from ls -l?
- Should I quit using Ifconfig?
- SSL Certificate Location on UNIX/Linux
- What is “-bash: !”: event not found”
- What version of RHEL am I using?
- Keeping a linux process running after I logout
- Force dig to resolve without using cache
- How do you make it obvious you are on a production system?
- How can I verify if TLS 1.2 is supported on a remote web server from the RHEL/CentOS shell?
- How to forcibly close a socket in TIME_WAIT?
- How to check if an RSA public / private key pair match
- Mount CIFS Host is down
- Colors in bash after piping through less?
- List of files installed from apt package
- How to copy a large number of files quickly between two servers
- Why does sudo command take long to execute?
- Allow SFTP but disallow SSH?
- “POSSIBLE BREAK-IN ATTEMPT!” in /var/log/secure — what does this mean?
- How to display certain lines from a text file in Linux?
- Can you have more than one ~/.ssh/config file?
- How can I export the privileges from MySQL and then import to a new server?
- Is there a directory equivalent of /dev/null in Linux?
- How to force nginx to resolve DNS (of a dynamic hostname) everytime when doing proxy_pass?
- Can I send some text to the STDIN of an active process running in a screen session?
- How can I get processor/RAM/disk specs from the Linux command Line? [duplicate]
- GPG does not have enough entropy
- Is there a way to see the execution tree of systemd?
- Why don’t EC2 ubuntu images have swap?
- How to determine the hostname from an IP address in a Windows network?
- SSHFS mount that survives disconnect
- Temporarily ignore my `~/.ssh/known_hosts` file?
- How to get TX/RX bytes without ifconfig?
- create home directories after create users
- Curl: disable certificate verification
- How do I redirect subdomains to a different port on the same server?
- Running Cron every 2 hours [duplicate]
- How to apply a filter to real time output of `tail -f `?
- How to check the physical status of an ethernet port in Linux?
- What does “debconf: delaying package configuration, since apt-utils is not installed” mean?
- Practical maximum open file descriptors (ulimit -n) for a high volume system
- In Linux, what is the difference between “buffers” and “cache” reported by the free command?
- How to handle relative urls correctly with a reverse proxy
- Where’s the conventional place to store git repositories in a linux file system tree?