CentOS6 – ShellCheck Wiki

See this page on GitHub


Note: Haskell Platform v7.10.3 and v8.0.1 requires glibc v2.14 but CentOS 6 has v2.12 so be sure to download v7.10.2-a release from their prior releases page.


yum groupinstall "Development Tools" -y
yum install gmp-devel # may need epel
sudo ln -s /usr/lib64/libgmp.so.3  /usr/lib64/libgmp.so.10

Get Haskell and build it

Based on https://www.haskell.org/platform/linux.html#linux-generic

dir="$(mktemp -d)"
pushd "$dir"
wget https://haskell.org/platform/download/7.10.2/haskell-platform-7.10.2-a-unknown-linux-deb7.tar.gz
tar xvzf haskell-platform-7.10.2-a-unknown-linux-deb7.tar.gz
rm -r "$dir"

Install ShellCheck

cabal update
cabal install shellcheck

Place it in a global directory

cp ~/.cabal/bin/shellcheck /usr/local/bin # portable to other el6 systems without Haskell

ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.