mBed Studio installation fails on Mac.

10 Aug 2019

You get an unhelpful error "the installation failed".

Check /var/log/install.log and you find:

019-08-10 12:56:17+01 tim-mbp installd[439]: PackageKit: Executing script "./postinstall" in /private/tmp/PKInstallSandbox.KWbHZw/Scripts/com.arm.mbed.studio.iV1Nf3 2019-08-10 12:56:17+01 tim-mbp installd[439]: ./postinstall: mv: rename /Applications/Mbed Studio.app/Contents/tools to mbed-studio-tools: No such file or directory

10 Aug 2019

Ok the problem is that it is trying to copy from `/Applications`, but it actually installs to `/Applications` (even though the "Install Location" is "Install for everyone").

Here's how to fix it:

  1. pkgutil --expand MbedStudio-0.5.3.pkg tmp
  2. nano tmp/com.arm.mbed.studio.pkg/Scripts/postinstall
  3. Comment out the line mv $2/Mbed\ Studio.app/Contents/tools mbed-studio-tools
  4. pkgutil --flatten tmp MbedStudio-0.5.3_fixed.pkg

Where do I report Mbed Studio bugs?

10 Aug 2019

Also you have to do the mv manually after the install.

12 Aug 2019

Hi Tim,

Thank you for reporting this issue. Mbed Studio should always install for all users in /Applications. Would you mind answering a few questions? That will help us investigate this issue.

1. You provided the same path twice. Have you got /Applications in mind? In your user folder?

2. Have you got an old version of Mbed Studio installed? Older than 0.5.0? In the past Mbed Studio was being installed in home /Applications folder. In that case new version would simply try to override that version and fail. The solution is to remove old version of Mbed Studio and install new again. There was a breaking change between 0.4.0 and 0.5.0.

Kind Regards

Arek Zaluski

15 Aug 2019

1. Yes. I think this forum might have removed a tilde, but to be clear it tries to copy from /Applications but is actually installed in $HOME/Applications

2. Yes! That explains it. It would still be nicer if there was a decent error message! Or maybe the installer could check for old incompatible versions before it starts. Maybe not worth fixing now - I'm probably among the small number of users this affected.