Change-type: patch
3.8 KiB
balena CLI Installation Instructions for macOS
These instructions are for the recommended installation option. Advanced users may also be interested in advanced installation options.
Selected operating system: macOS
-
Download the installer from the latest release page. Look for a file name that ends with "-installer.pkg":
balena-cli-vX.Y.Z-macOS-x64-installer.pkg
-
Double click the downloaded file to run the installer. After the installation completes, close and re-open any open command terminal windows (so that the changes made by the installer to the PATH environment variable can take effect).
-
Check that the installation was successful by running the following commands on a command terminal:
balena version
- should print the CLI's versionbalena help
- should print a list of available commands
No further steps are required to run most CLI commands. The balena ssh
, build
, deploy
and preload
commands may require additional software to be installed, as described
in the next section.
To update the balena CLI, repeat the steps above for the new version.
To uninstall it, run the following command on a terminal prompt:
sudo /usr/local/lib/balena-cli/bin/uninstall
Additional Dependencies
build and deploy
These commands require Docker or balenaEngine to be available (on a local or remote machine). Most users will follow Docker's installation instructions to install Docker on the same workstation (laptop) as the balena CLI. The advanced installation options document describes other possibilities.
balena ssh
The balena ssh
command requires the ssh
command-line tool to be available. To check whether
it is already installed, run ssh
on a Terminal window. If it is not yet installed, the options
include:
- Download the Xcode Command Line Tools from https://developer.apple.com/downloads
- Or, if you have Xcode installed, open Xcode, choose Preferences → General → Downloads → Components → Command Line Tools → Install.
- Or, install Homebrew, then
brew install openssh
The balena ssh
command also requires an SSH key to be added to your balena account: see SSH
Access documentation. The balena key*
command set can also be used to list and manage SSH keys: see balena help -v
.
balena preload
Like the build
and deploy
commands, the preload
command requires Docker, with the additional
restriction that Docker must be installed on the local machine (because Docker's bind mounting
feature is used). Also, preloading balenaOS images for some older device types (like the Raspberry
Pi 3, but not the Raspberry 4) requires Docker to support the AUFS storage
driver. Unfortunately, Docker Desktop
for Windows or macOS dropped support for the AUFS filesystem in Docker CE versions greater than
18.06.1. The present workarounds are to either:
- Install the balena CLI on Linux (e.g. Ubuntu) with a virtual machine like VirtualBox. This works because Docker for Linux still supports AUFS. Hint: if using a virtual machine, copy the image file over, rather than accessing it through "file sharing", to avoid errors.
- Downgrade Docker Desktop to version 18.06.1. Link: Docker CE for Mac
We are working on replacing AUFS with overlay2 in balenaOS images of the affected device types.