We have found some common errors that users face and have listed them here to help you get started with your application as quickly as possible.

Mbed CLI issues or Error: collect2: error: ld returned 1 exit status

Purge the cache with the following command:

mbed cache purge

You probably also have a stale BUILD folder. Clean up your directory and try again:

rm -rf BUILD


Error: Prompt wrapping around line

If your terminal is wrapping your text as show here:

Error prompt wrapping around line image

In your terminal type:

export PS1='\u@\h: '

For a more minimalist type:

export PS1='> '


Error: "Requires make version 3.82 or later (current is 3.81)"

If you encounter this error, install the brew and make by typing the following code:

ruby -e "$(curl -fsSL"
brew install make

Note: On a Mac, you might have to use gmake instead of make, to run your commands.


Error: -bash: mbed: command not found

If you encounter this error, try the following fixes.

For Mac:

We recommend using the installer and running the downloaded Mbed CLI App. This app will automatically launch a shell with all the dependencies solved for you.

If installed manually, make sure to follow these instructions.

Mbed CLI chip image

For Windows:

Make sure that you add Mbed CLI to Windows system PATH

  1. Press Windows+X to open the Power Users menu, and then click System to launch System dialog.


    On Windows 8, select Advanced system settings.


    On Windows 10, type env in the search box, and select Edit the system environment variables option from the dropdown list.


  2. Click the Environment Variable button.


  3. Click the PATH variable and append mbed-cli to the PATH. By default, use C:\mbed-cli\mbed-cli\mbed-cli-1.8.3\mbed\.


    Now, if you type mbed from a command prompt, you should be able to see mbed help commands.

Previous Next