I have been downloading the latest version of ShellCheck and tried to install it on my System taking the following steps:

I downloded shellcheck-latest.linux.x86_64.tar.xz then I run as root:

# extracting the tar
tar --directory=/opt -xvf shellcheck-latest.linux.x86_64.tar.xz

# added the directory to path
export PATH=$PATH:/opt/shellcheck/bin

# created a symlink:
cd /usr/bin
ln -s /opt/shellcheck shellsheck

if I try to run the program I always get the following error (translated from german):

bash: /usr/bin/shellcheck: Can not run binary file: wrong format.

In the README it says:

This is a precompiled ShellCheck binary.

so I thought I would run fine with this steps.

Here are some of my system informations:

  Operating System: Debian GNU/Linux buster/sid
            Kernel: Linux 4.11.0-1-686-pae
      Architecture: x86
  • Is: ln -s /opt/shellcheck shellsheck an innocent typo at the end? – Jeff Schaller Jul 22 '17 at 22:15
  • @JeffSchaller, oh thanks. Though this was not the problem. I used autocomplete and so I invoked the binary, but without realizing this typo. – nath Jul 22 '17 at 22:20

You need to download the 32-bit version of Spellcheck. Your kernel is not the x86_64 64-bit kernel.

|improve this answer|||||
  • ok there we go, thanks. I thought ...x86_64 was working for x86. – nath Jul 22 '17 at 22:16
  • Yeah, naming convention is a little ambigous. – Deathgrip Jul 22 '17 at 22:20
  • importunately I do not find a pre-compiled version for 32bit. So I'll stick with the LTS version from the debian repository. I just found a way of ignoring the errors I wanted to get rid of with the newest version. Ohh btw. the application is called "ShellCheck" not "SpellCheck" – nath Jul 22 '17 at 22:24
  • What about downloading the source and compiling it yourself? – Deathgrip Jul 22 '17 at 22:27
  • I just never did it. If I can spend a little more time for that this is definitely an option. I thought this one was really easy but honestly I misinterpreted x86_64 as working for both and was already wondering the tar was only containing one binary. – nath Jul 22 '17 at 22:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.