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

Instructions for how to install on Redhat and Centos 6 #427

Closed
erichelgeson opened this issue Aug 6, 2015 · 5 comments
Closed

Instructions for how to install on Redhat and Centos 6 #427

erichelgeson opened this issue Aug 6, 2015 · 5 comments

Comments

@erichelgeson
Copy link

New to haskell and how it works, it took me a bit of digging on how to get it all working. Thought I'd share!

# Deps
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

# From https://www.haskell.org/platform/linux.html#linux-generic 
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
./install-haskell-platform.sh
cabal install shellcheck
cp .cabal/bin/shellcheck /usr/local/bin # portable to other el6 systems without haskell

👍 for shellcheck

@koalaman
Copy link
Owner

ThanksI I copied it to the wiki: https://github.com/koalaman/shellcheck/wiki/CentOS6

@deryni
Copy link

deryni commented Aug 20, 2015

Why is that symlink necessary? That's a fairly intrusive thing to do and is almost always the wrong idea (i.e. messing with links in system directories like that).

@dfong
Copy link

dfong commented Sep 3, 2015

a few comments on the build instructions. they almost worked for me, but:

sudo is needed on some of the other commands that are not marked as such.
/usr/local/bin needs to be in PATH.
it should be run from the $HOME directory, otherwise ".cabal" should be $HOME/.cabal .

shelltool is very useful. i wish it was easier to install.

@sblanton
Copy link

CentOS 7 Instructions:

Do the above, but skip the symbolic link step. Did these cabal commands to make it work:

$ sudo PATH=/usr/local/bin:$PATH /usr/local/bin/cabal update
Downloading the latest package list from hackage.haskell.org

$ sudo PATH=/usr/local/bin:$PATH /usr/local/bin/cabal install shellcheck
Resolving dependencies...
Downloading json-0.9.1...
Downloading regex-tdfa-1.2.2...
Configuring regex-tdfa-1.2.2...
Configuring json-0.9.1...
Building regex-tdfa-1.2.2...
Building json-0.9.1...
Installed json-0.9.1
Installed regex-tdfa-1.2.2
Downloading ShellCheck-0.4.5...
Configuring ShellCheck-0.4.5...
Building ShellCheck-0.4.5...
Installed ShellCheck-0.4.5

NOTE: The above gets around the following issues I encountered:

$ sudo /usr/local/bin/cabal install shellcheck
cabal: The program 'ghc' version >=6.4 is required but it could not be found.
$ ghc --version

The Glorious Glasgow Haskell Compilation System, version 7.10.2
And then:

$ sudo PATH=/usr/local/bin:$PATH /usr/local/bin/cabal install shellcheck
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
cabal: There is no package named 'shellcheck'.
You may need to run 'cabal update' to get the latest list of available
packages.

@AdrianDC
Copy link

AdrianDC commented Jun 10, 2018

CentOS 6.7 RHEL6 instructions for shellcheck (includes 32bits i686):

  1. Based upon Haskell's documentation: https://www.haskell.org/downloads/linux
  2. Adds petersen ghc repository
  3. Installs updated cabal and ghc
  4. Updates cabal
  5. Installs shellcheck
  6. Copies the executable binary
# === As root ===
{
  # Add unofficial Fedora Copr repos
  curl https://copr.fedorainfracloud.org/coprs/petersen/ghc-7.10.3/repo/epel-6/petersen-ghc-7.10.3-epel-6.repo \
      > /etc/yum.repos.d/epel-petersen.repo;

  # Install Haskell
  yum install ghc cabal-install cabal-dev;

  # Prepare Haskell
  cabal update;
  cabal install cabal-install;

  # Install shellcheck
  cabal install shellcheck;
  cp -fv ~/.cabal/bin/shellcheck /usr/local/bin/;
}

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

6 participants