0

I am trying to write a software to automatically install Linpack on a CentOS Server.

Here's the code I've been working with so far

First, I upload 2 zip files to the SFTP Server that's running on CentOS, which works fine. Then I extract those 2 files using the commands tar xfv l_mklb_p_2020.2.001.tgz and tar xfv l_mpi_2019.8.254.tgz which also work as intended. Then I try to cd l_mpi_2019.8.254 into the extracted folder to execute ./install.sh

However, this is where my program fails. I get the exit code 127, which would imply that the command does not exist/can't be found

Executing these commands in the same order manually over PuTTy works just fine though, so I am unsure why it isn't working in my program. Maybe the / gets escaped so the command that's executed is .//install.sh? How would I check for that though? Does anyone have any ideas?

Korlimann
  • 147
  • 14
  • 1
    Is the executable flag for `./install.sh` set? You can set it using `chmod` or call the script with a shell e.g. `bash ./install.sh`. – LinFelix Nov 04 '21 at 09:58
  • @LinFelix thanks for the suggestions! I tried replacing `./install.sh` with `bash ./install.sh` but that also returned 127 as exit code. I then tried adding the command `chmod +x install.sh` (before executing the script) which returned a 1. – Korlimann Nov 04 '21 at 10:39

0 Answers0