Home > other >  cannot execute binary file: Exec format error when bash a file .sh
cannot execute binary file: Exec format error when bash a file .sh

Time:10-18

I am new to Linux, when I download the zip from GitHub to do a test on image segmentation, when I want to download the dataset,

bash script/download.data.sh

then it comes to an id of kaggle and needs a Kaggle API, but I don't have a Kaggle account, so I pass it, then, when I want to down the file, it always appears error as below:


Requirement already satisfied: idna<4,>=2.5 in /home/xiongjl2022/anaconda3/envs/yolo/lib/python3.8/site-packages (from requests->kaggle) (3.4)
Requirement already satisfied: charset-normalizer<3,>=2 in /home/xiongjl2022/anaconda3/envs/yolo/lib/python3.8/site-packages (from requests->kaggle) (2.1.1)
401 - Unauthorized
scripts/download_data.sh: line 18: /mnt/c/Users/DELL/AppData/Roaming/MobaXterm/slash/bin/unzip: cannot execute binary file: Exec format error
mv: cannot stat 'train_hq/*': No such file or directory
rm: cannot remove 'train_hq': No such file or directory
rm: cannot remove 'train_hq.zip': No such file or directory
401 - Unauthorized
scripts/download_data.sh: line 24: /mnt/c/Users/DELL/AppData/Roaming/MobaXterm/slash/bin/unzip: cannot execute binary file: Exec format error
mv: cannot stat 'train_masks/*': No such file or directory
rm: cannot remove 'train_masks': No such file or directory
rm: cannot remove 'train_masks.zip': No such file or directory

please help me, thanks!

CodePudding user response:

Apart from the 401 error you are getting because of missing credentials, it also looks like the script is trying to execute "unzip" from what looks like a mounted Windows directory:

scripts/download_data.sh: line 18: /mnt/c/Users/DELL/AppData/Roaming/MobaXterm/slash/bin/unzip: cannot execute binary file: Exec format error

Not sure, how you have setup your LINUX system, but it is quite weired that it tries to execute unzip from the directory in question. In addition to the script, please also provide the output of your PATH (echo $PATH from the command line).

CodePudding user response:

Can you share the bash script file? It looks like the script if fetching the data from web and you did not provide the credentials. I need to look in to the script to know what is going on in it.

  • Related