Skip to content

Error while loading shared libraries, skm global install failed

Problem

When trying to run a SplashKit program, you may see an error indicating that libSplashKit.so cannot be found. This is often due to missing or incorrect paths in the shell profile or system library configuration.

Error Example

Solutions

Follow these steps to ensure your shell profile and system library paths are configured correctly.

Step 1: Update Your Shell Profile (~/.bashrc or ~/.zshrc)

For Bash Users:

  1. Open the ~/.bashrc file:

    Terminal window
    nano ~/.bashrc
  2. Add the following line near the end of the file to include SplashKit in your PATH:

    Terminal window
    export PATH="$PATH:$HOME/.splashkit"
  3. Save and close the file, then apply the changes:

    Terminal window
    source ~/.bashrc

For Zsh Users:

  1. Open the ~/.zshrc file:

    Terminal window
    nano ~/.zshrc
  2. Add the following line near the end of the file:

    Terminal window
    export PATH="$PATH:$HOME/.splashkit"
  3. Save and close the file, then update your profile:

    Terminal window
    source ~/.zshrc

Step 2: Update the System Library Path

To ensure the system can locate libSplashKit.so, add /usr/local/lib to the system’s library path:

Terminal window
sudo ldconfig /usr/local/lib

This command configures the system to recognize libraries in /usr/local/lib, ensuring that libSplashKit.so is accessible to your applications.


Following these steps should resolve the libSplashKit.so not found error and allow you to successfully run SplashKit programs on Linux.