aws / aws-elastic-beanstalk-cli-setup

Simplified EB CLI installation mechanism.
Apache License 2.0
514 stars 227 forks source link

Linux installation fails due to scripts having been saved on Windows #83

Open BenTels opened 4 years ago

BenTels commented 4 years ago

1. Please specify the following:

2. Description The instruction for installation, step 2.2, is to run ./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer . However, this script seems to have been saved using a Windows editor. Which mean that the script does not run in Linux due to the EOL return character:

~/Documents/ebcli> ./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer /usr/bin/env: ‘bash\r’: No such file or directory

This can be overcome by applying dos2unix. However, the installer installs a temporary python version and the script for that has the same problem.

rahulrajaram commented 4 years ago

@BenTels , thanks for reaching out. It is bizarre that you are seeing this issue. Does the following command output anything? I can't get the script to fail in the manner it failed for you.

I'm curious to know what file system you are using on OpenSUSE.

BenTels commented 4 years ago

@rahulrajaram What command?

The file system that the script is on (i.e. that I cloned the repo to) is an XFS. The /home mount point is there. The rest of the system is on BTRFS.

BenTels commented 4 years ago

@rahulrajaram Just FYI, I gave up on the script installation. I ran dos2unix to fix the script and tried to modify it to use local python (both the stock 3.6 from OpenSuse and 3.8.2 that I built from source) but the script just failed with module errors. And I don't know the python platform well enough to fix it. I did a manual install with pip instead.

For future versions I would suggest going the route of AWS2: unzippable install package. Simple and robust.

rahulrajaram commented 4 years ago

@BenTels ,

Sorry for the delay in responding to you. I suspect the original problem was XFS specific, although I would need to test it on XFS to tell for sure.

but the script just failed with module errors. And I don't know the python platform well enough to fix it. I did a manual install with pip instead... For future versions I would suggest going the route of AWS2: unzippable install package. Simple and robust.

This is valuable feedback and we should look into it.

SelimAtAnka commented 4 years ago

Encounter with the same bug.

Inital shell file's file (file start.sh) result. POSIX shell script, ASCII text executable, with CRLF line terminators

EB-cli Version EB CLI 3.18.2 (Python 3.8.2)

I converted CRLF to LF on windows with VS Code and WSL - dos2unix and tested. It did not work. image

I did a quick check if I can fix it but understood nothing. Sorry that I cannot help with the bug.