microsoft / mdatp-xplat

Microsoft Defender for macOS/Linux - config samples, auxiliary tools
MIT License
187 stars 188 forks source link

"Command Not Found" Errors #130

Open pshankland opened 6 months ago

pshankland commented 6 months ago

Trying to install on a clean Ubuntu 22.04.4 server but getting the following:

someone@logforwarder-26022024:~/downloads$ sudo bash ./mde_installer.sh --install ./mde_installer.sh: line 1: get_python: command not found ./mde_installer.sh: line 1: parse_uri: command not found ./mde_installer.sh: line 1: parse_uri: command not found ./mde_installer.sh: line 1: parse_uri: command not found ./mde_installer.sh: line 1: parse_uri: command not found ./mde_installer.sh: line 1: --install-: syntax error: operand expected (error token is "-")

Python3 is installed.

What am I missing?

anoliveiraM commented 6 months ago

@pshankland

Just tested the script on a Ubuntu 22.04 and was able to install:

Python version used: Python 3.10.12

OS:

cat /etc/os-release PRETTY_NAME="Ubuntu 22.04.4 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.4 LTS (Jammy Jellyfish)"

Hash of installer

sha256sum mde_installer.sh c63d2a06469510364d2d03d5f095beb3572b6fd4ba3c7fc6a295fdd5a8c905d0 mde_installer.sh

Test running the script like so:

sudo /usr/bin/bash mde_installer.sh --install

One cause for the issue might be that the system is not interpreting the shebang at the beginning of the script. The issue could also be due to the fact that the script is incomplete/corrupt as by the looks of the error message it's saying that those functions have not been declared, if the script does not run with the above command please share the hash of the mde_installer.sh that you are using.

pshankland commented 6 months ago

OS:

PRETTY_NAME="Ubuntu 22.04.4 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.4 LTS (Jammy Jellyfish)"

Output after running script as suggested:

pshankland@logforwarder:~/downloads$ sudo /usr/bin/bash mde_installer.sh --install [sudo] password for pshankland: mde_installer.sh: line 1: get_python: command not found mde_installer.sh: line 1: parse_uri: command not found mde_installer.sh: line 1: parse_uri: command not found mde_installer.sh: line 1: parse_uri: command not found mde_installer.sh: line 1: parse_uri: command not found mde_installer.sh: line 1: --install-: syntax error: operand expected (error token is "-")

anoliveiraM commented 6 months ago

@pshankland , can you please provide me with the hash of the script you are using?

pshankland commented 6 months ago

080855b88ee3f94c3f3c4aa63a3ea8bfe3f4de32048d44be5061278e69217b1a mde_installer.sh

anoliveiraM commented 6 months ago

@pshankland , can that hash does not match the hash I've used can you please re download the script?