Balena CLI not running under Debian11

Following the instructions in Get Started with balenaCloud using BeagleBone Green and Python - Balena Documentation

1)installed os on beaglebone ok, shows up on dash.

  1. installed balena-cli on debian, won’t run & get command not found error.

mike@Thorin:~/Downloads/balena/balena-cli$ balena login
bash: balena: command not found

Directory listing:

mike@Thorin:~/Downloads/balena/balena-cli$ ls -l
total 211704
drwxr-xr-x 3 mike mike 4096 Jun 9 15:28 abstract-socket
-rwxr-xr-x 1 mike mike 216677370 Jun 9 15:41 balena
drwxr-xr-x 3 mike mike 4096 Jun 9 15:28 cpu-features
drwxr-xr-x 3 mike mike 4096 Jun 9 15:28 drivelist
drwxr-xr-x 3 mike mike 4096 Jun 9 15:28 etcher-sdk
drwxr-xr-x 4 mike mike 4096 Jun 9 15:28 ffi-napi
drwxr-xr-x 4 mike mike 4096 Jun 9 15:28 lzma-native
drwxr-xr-x 3 mike mike 4096 Jun 9 15:28 mountutils
drwxr-xr-x 3 mike mike 4096 Jun 9 15:28 ref-napi
drwxr-xr-x 3 mike mike 4096 Jun 9 15:28 @ronomon
drwxr-xr-x 3 mike mike 4096 Jun 9 15:28 ssh2
drwxr-xr-x 3 mike mike 4096 Jun 9 15:28 usb
-rwxr-xr-x 1 mike mike 25763 Jun 9 15:41 xdg-open
-rwxr-xr-x 1 mike mike 21439 Jun 9 15:41 xdg-open-402
drwxr-xr-x 3 mike mike 4096 Jun 9 15:28 xxhash-addon

So it looks like the software installed ok. The Directory was added to the PATH, and I was trying to run the command from the directory. Program has execute permissions.

Also tried the git access,
image
the first command returned:
fatal: not a git repository (or any of the parent directories): .git

“set up Git remote” is obscure.
There needs to be more information for people (like me) who haven’t done this before.

Hi,

The first error says you can’t run balena, this can have two causes (in order of likelihood):

  1. You haven’t properly added the directory containing balena to your PATH environment variable; note you may also need to logout and login for it to take effect. Also note that your current directory is not part of PATH; if you want to run the executable in your current directory, you need to use ./balena instead of balena
  2. You downloaded a version incompatible with your computer architecture (ex. trying to run x86-64 on ARM)

The “setup git remote” bit assumes you are already working on a project using git.
The error you are getting suggests you are not.

There are plenty of tutorials on how to use git; for example this one.

You basically have 2 options: create a new git repository (with your existing source code), or clone an existing one.
To create a new one, go to your project directory and run git init.
To use an existing repository, you can run git clone https://github.com/balena-io-examples/balena-nodejs-hello-world.git (or whichever project you want) and then cd to that directory.

From your project directory that now contains a .git directory, you can run the git remote add balena ... and git push balena master commands.

1 Like