[SOLVED] Docker Installation Problem Mac Book M1 Silicon


#1

When following the installation steps I got stuck at the following command:

Installation and running NRP using Docker containers — HBP Neurorobotics Platform 3.2.0 documentation

Before I already executed the following command:

(base) paolo@Paolos-MacBook-Pro downloads % echo “127.0.0.1 host.docker.internal” | sudo tee -a /etc/hosts

127.0.0.1 host.docker.internal

(base) paolo@Paolos-MacBook-Pro ~ % chmod 755 nrp_installer.sh

./nrp_installer.sh install latest

grep: /proc/version: No such file or directory

./nrp_installer.sh: line 461: declare: -A: invalid option

declare: usage: declare [-afFirtx] [-p] [name[=value] …]

The file nrp_installer.sh is in my home folder where I am currently at. How can I fix this error? I already tried with sudo, but it still did not work.
The problem must have to do with the ports to host. I am new to using terminal or the command line interface so I am not sure how to resolve this error. I have not been successful in finding an answer on Google.

Kind regards,
Paolo


#2

Hi Paolo,

could you edit line 453 like so:

from
if grep -qEi "(Microsoft|WSL)" /proc/version; then
to
if [[ -n "$IS_WSL" || -n "$WSL_DISTRO_NAME" ]]; then

Please let me know if that solves your issue.

Cheers,

Ugo


#3

I still get this error:
(base) paolo@Paolos-MacBook-Pro ~ % chmod 755 nrp_installer.sh

./nrp_installer.sh install latest

./nrp_installer.sh: line 461: declare: -A: invalid option

declare: usage: declare [-afFirtx] [-p] [name[=value] …]


#4

It seems that /usr/bin/bash points to an old bash version:

Please, edit line 1:

from
#!/usr/bin/bash
to
#!/usr/bin/env bash


#5

I have the same problem (MPB with M1 Pro) and #!/usr/bin/env bash did not solve the problem for me


#6

Sorry to hear that, unfortunately we don’t have the possibility to test on Macs.

What’s the output of these commands when run in a terminal?

  1. /usr/bin/bash --version
  2. /usr/bin/env bash --version

Thank you


#7

Still the same:

./nrp_installer.sh: line 461: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]

Thanks for your help!


#8

I have the exact same problem.
My bash version is:

GNU bash, version 3.2.57(1)-release (arm64-apple-darwin21)
Copyright © 2007 Free Software Foundation, Inc.

On a MBP, macOS Montery 12.3.1 (21E258)


#9

nrp_installer.sh requires bash 4.0 since it leverages associative arrays, a feature introduced such version.

As reported by some user, by default mac is stuck to the (very old) bash 3.x, which doesn’t support them (declare -A).

Installing bash 4.0 will solve the issue.

Cheers


#10

Worked for me! Thanks!

`(conSys) ap@Lancia-Book ~ system_profiler SPSoftwareDataType
Software:

System Software Overview:

  System Version: macOS 12.4 (21F79)
  Kernel Version: Darwin 21.5.0
  Boot Volume: Macintosh HD`