Setup_env.sh:40: = not found

Hello!

I followed the tutorial at https://youtu.be/_aCyR8XJcws?t=528 and ran
source setup_env.sh.

I encountered the error setup_env.sh:40: = not found.

I couldn’t find any related topics in the forums. How should I resolve this issue?

abnormal situation

➜  hailo-rpi5-examples : main ᐅ  source setup_env.sh
Setting up the environment...
Setting up the environment for hailo-tappas-core...
setup_env.sh:40: = not found

Environmental information

➜  hailo-rpi5-examples : main ᐅ  lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm


➜  hailo-rpi5-examples : main ᐅ  uname -a
Linux pi5-ai 6.6.31+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.31-1+rpt1 (2024-05-29) aarch64 GNU/Linux


➜  hailo-rpi5-examples : main ᐅ  python --version
Python 3.11.2


➜  hailo-rpi5-examples : main ᐅ  pip --version
pip 23.0.1 from /usr/lib/python3/dist-packages/pip (python 3.11)
➜  hailo-rpi5-examples : main ᐅ  hailortcli fw-control identify
Executing on device: 0000:01:00.0
Identifying board
Control Protocol Version: 2
Firmware Version: 4.17.0 (release,app,extended context switch buffer)
Logger Version: 0
Board Name: Hailo-8
Device Architecture: HAILO8L
Serial Number: HLDDLBB241602424
Part Number: HM21LB1C2LAE
Product Name: HAILO-8L AI ACC M.2 B+M KEY MODULE EXT TMP
➜  hailo-rpi5-examples : main ᐅ  gst-inspect-1.0 hailotools
Plugin Details:
  Name                     hailotools
  Description              hailo tools plugin
  Filename                 /lib/aarch64-linux-gnu/gstreamer-1.0/libgsthailotools.so
  Version                  3.28.2
  License                  unknown
  Source module            gst-hailo-tools
  Binary package           gst-hailo-tools
  Origin URL               https://hailo.ai/

  hailoaggregator: hailoaggregator - Cascading
  hailocounter: hailocounter - postprocessing element
  hailocropper: hailocropper
  hailoexportfile: hailoexportfile - export element
  hailoexportzmq: hailoexportzmq - export element
  hailofilter: hailofilter - postprocessing element
  hailogallery: Hailo gallery element
  hailograytonv12: hailograytonv12 - postprocessing element
  hailoimportzmq: hailoimportzmq - import element
  hailomuxer: Muxer pipeline merging
  hailonv12togray: hailonv12togray - postprocessing element
  hailonvalve: HailoNValve element
  hailooverlay: hailooverlay - overlay element
  hailoroundrobin: Input Round Robin element
  hailostreamrouter: Hailo Stream Router
  hailotileaggregator: hailotileaggregator
  hailotilecropper: hailotilecropper - Tiling
  hailotracker: Hailo object tracking element

  18 features:
  +-- 18 elements
➜  hailo-rpi5-examples : main ᐅ  gst-inspect-1.0 hailo

Plugin Details:
  Name                     hailo
  Description              hailo gstreamer plugin
  Filename                 /lib/aarch64-linux-gnu/gstreamer-1.0/libgsthailo.so
  Version                  1.0
  License                  unknown
  Source module            hailo
  Binary package           GStreamer
  Origin URL               http://gstreamer.net/

  hailodevicestats: hailodevicestats element
  hailonet: hailonet element
  synchailonet: sync hailonet element

  3 features:
  +-- 3 elements

I found that this error occurs when using oh-my-zsh in the terminal, but it works fine when using the native bash terminal on the Raspberry Pi.

Is there a solution to this issue?

Thank you for your response.

I’ve modified line 40 of the setup_env.sh script, changing the double equals sign to a single equals sign, so that it can be executed under zsh.

Before modification:

if [ "$TAPPAS_VERSION" == "$version" ]; then

After modification:

if [ "$TAPPAS_VERSION" = "$version" ]; then
1 Like