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

unix_setup.sh script error due to ^M #5153

Open
mfrade opened this issue Sep 4, 2019 · 9 comments
Open

unix_setup.sh script error due to ^M #5153

mfrade opened this issue Sep 4, 2019 · 9 comments

Comments

@mfrade
Copy link

mfrade commented Sep 4, 2019

When I run the unix_setup.sh script I get this error:
./unix_setup.sh: /bin/bash^M: bad interpreter: No such file or directory

This error happens because the file was saved with "windows style" end of the line (\r\n), which appears as ^M at the end of every line:
cat -Te unix_setup.sh

This error can be easily fixed:
dos2unix unix_setup.sh

@vandorb12
Copy link

Running sh unix_setup.sh will run this script in macOS.

@danetrain
Copy link

danetrain commented Sep 26, 2019

I get the "bad interpreter" error as well when running with "./unix_setup.sh". When I run "sh unix_setup.sh" I get some really nonsensical output:

: command not found 5: 
: command not found 9: 
: command not found 10: 
---------------------------------------------
Checking prerequisites and preparing Autopsy:
---------------------------------------------
: command not found 15: 
-n Checking for PhotoRec...
unix_setup.sh: line 22: syntax error near unexpected token `elif'
'nix_setup.sh: line 22: `elif [ -f "$photorec_osx_filepath" ]; then ''

@danetrain
Copy link

Update: running dos2unix on the setup script resolves these issues for me as well.

@bcarrier
Copy link
Member

Are you guys running this from the "ZIP" file or from source code?

If ZIP, we should fix this in the installer.

@danetrain
Copy link

danetrain commented Sep 26, 2019

For me it's from the ZIP. Also when I start up Autopsy I get a UI with essentially no options and no functionality.
Screen Shot 2019-09-26 at 11 12 59 AM

@mfrade
Copy link
Author

mfrade commented Sep 26, 2019

I also used the ZIP file.

@d0n601
Copy link

d0n601 commented Oct 6, 2019

Are you guys running this from the "ZIP" file or from source code?

If ZIP, we should fix this in the installer.

I too got this issue from the zip and fixed it in the same way. It does seem to be an issue with the installer.

@rcordovano
Copy link
Contributor

rcordovano commented Oct 7, 2019 via email

@tjt263
Copy link

tjt263 commented Oct 18, 2019

this is easy to fix:

vim '+set ff=unix' '+w' '+q' ./unix_setup.sh

done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants