Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

macOS Catalina: trying to install content to the system volume

I have apps that I distribute as .pkg files created using pkgbuild and productbuild. With macOS Catalina, this doesn't work any more. The installer complains that I'm trying to install content to the system volume.

I posted three weeks ago thinking the error had to do with bundling a Java runtime. It turns out it has nothing to do with Java.

To test it I have the smallest possible project called Hello with a main window and a button to click. In XCode, I do Product -> Archive, then Distribute App, and Copy App. This creates a directory Hello 2019-12-18 15-01-07 with contents Hello.app. The app works fine. I then pkgbuild --root *7 Hello.pkg which creates Hello.pkg.

When I double-click Hello.pkg in the finder the installer presents me with screens for Introduction, Destination Select (only one option is offered), and Installation type ("Standard Install on Macintosh HD"), then asks me for my password. It then says, "This package is incompatible with this version of macOS. The package is trying to install content to the system volume. Contact the software manufacturer for assistance."

It makes no difference if I codesign and notarize. Productbuild only adds one more layer to the failing process.

What am I missing?

like image 930
Jerry Agin Avatar asked Dec 18 '19 20:12

Jerry Agin


People also ask

Why is my macOS Catalina not installing?

Typically, a macOS download fails if you do not have enough storage space available on your Mac. To make sure you do, open up the Apple menu and click on 'About This Mac. ' Select 'Storage' then check to make sure you have enough space on your hard drive. You need at least 15GB free.

How do I stop installer on Mac?

If an app stops responding and you can't quit the app normally, use these steps to force the app to quit. To quit a Mac app normally, choose Quit from the app's menu in the menu bar, or press Command-Q.

How do I do a clean install of OSX 10.15 Catalina?

Press the power button to turn on the Mac – but keep it pressed until you see the startup options window including your bootable volume. Choose the bootable installer volume. Click Continue. The macOS installer should open – when it does follow the onscreen instructions to do the clean install.


1 Answers

We could fix the issue by using the option

--install-location

of the pkgbuild command.

If the

--install-location

option is not used, pkgbuild uses / as the default install location in many cases.

In macOS Catalina, only certain folders are writable. Refer this link for more details.

In our case, the package installation succeeded only when we specified one of the writable folders such as

/usr/local
/opt
/Applications

as the default install location.

like image 94
Anand Navale Avatar answered Oct 19 '22 14:10

Anand Navale