Posted on 11-10-2021 10:34 AM
Trying to set up the automated script to install Rosetta 2 on our new M1 computers and I keep getting the
Package Authoring Error: 002-23588: Package reference com.apple.pkg.RosettaUpdateAuto is missing installKBytes attribute
error. It says installed successfully, but if I rerun the script it tries again with the same result. If i try to run a policy that installs an Intel package it still errors out saying I need Rosetta.
I've tried a couple different scripts from the simple one-liner
usr/sbin/softwareupdate --install-rosetta --agree-to-license
to the extended version posted by Der Flounder.
I read that you can double click the Updater from CoreServices, but I'm hoping to automate this, not retouch every computer we set up.
I thought it might be because at one point I removed Rosetta on this one so I could use it as a test laptop. So I completely reinstalled Big Sur on it and tried again, but I still get the error. Any solutions?
Posted on 11-10-2021 11:26 AM
FWIW this is our current method. I have a Policy named "0 - Install Rosetta 2" so that it runs first when a computer goes through PreStage:
Then this from the Der Flounder script:
#!/bin/bash
# Installs Rosetta as needed on Apple Silicon Macs.
exitcode=0
# Determine OS version
# Save current IFS state
OLDIFS=$IFS
IFS='.' read osvers_major osvers_minor osvers_dot_version <<< "$(/usr/bin/sw_vers -productVersion)"
# restore IFS to previous state
IFS=$OLDIFS
# Check to see if the Mac is reporting itself as running macOS 11
if [[ ${osvers_major} -ge 11 ]]; then
# Check to see if the Mac needs Rosetta installed by testing the processor
processor=$(/usr/sbin/sysctl -n machdep.cpu.brand_string | grep -o "Intel")
if [[ -n "$processor" ]]; then
echo "$processor processor installed. No need to install Rosetta."
else
# Check Rosetta LaunchDaemon. If no LaunchDaemon is found,
# perform a non-interactive install of Rosetta.
if [[ ! -f "/Library/Apple/System/Library/LaunchDaemons/com.apple.oahd.plist" ]]; then
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
if [[ $? -eq 0 ]]; then
echo "Rosetta has been successfully installed."
else
echo "Rosetta installation failed!"
exitcode=1
fi
else
echo "Rosetta is already installed. Nothing to do."
fi
fi
else
echo "Mac is running macOS $osvers_major.$osvers_minor.$osvers_dot_version."
echo "No need to install Rosetta on this version of macOS."
fi
exit $exitcode
Posted on 11-10-2021 11:31 AM
Yes, this is one of the scripts that I tried. I still get the error that it's missing InstallKBytes attribute.
I've seen a couple of other people post that they've gotten this error. Someone said that manually double clicking /System/Library/CoreServices/Rosetta 2 Updater fixes it, but for me that comes back saying an error has occurred, please try again later.
Once I get the script actually working, I'll worry about putting it at the top of the workflow.
Posted on 11-11-2021 10:57 AM
I'm using derflounder's script in a blank package with a preinstall script.
Posted on 11-12-2021 05:30 AM
Hi @nikgio I am using the same script as @jordan_m1 I also get an error but with a slightly different error code.
The script works fine with me. Apps who need Rosetta2 are working.
Script result: 2021-11-09 15:10:12.289 softwareupdate[3403:24805] Package Authoring Error: 002-23768: Package reference com.apple.pkg.RosettaUpdateAuto is missing installKBytes attribute
By using the agreetolicense option, you are agreeing that you have run this tool with the license only option and have read and agreed to the terms.
If you do not agree, press CTRL-C and cancel this process immediately.
Installing: 0.0%
Installing: 0.0%
Installing: 100.0%
Installing: 100.0%
Installing: -1.0%
Installing: 2.0%
Installing: 2.0%
Installing: 100.0%
Install of Rosetta 2 finished successfully
Rosetta has been successfully installed.
I made a smart group called Macs with ARM Chip so that only those get the package installed.
I just did the command in terminal on a Macbook Pro with a M1 Pro chip. I get the exact same error when entering
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
Posted on 11-12-2021 05:43 AM
Also, I should add that my Policy just runs the script and does an inventory update. I don't have it in a package or anything. It runs at the Enrollment Complete trigger.
Posted on 12-16-2021 12:06 PM
I'm having the same issue:
Authoring Error: 002-23768: Package reference
Doesn't matter how and when I invoke this, it's always the same result.
This is what I'm running:
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
Posted on 04-21-2022 11:31 PM
How did it resolve then? I am getting the same problem.
04-24-2022 02:46 PM - edited 04-24-2022 02:48 PM
It's fine if you don't resolve it. Rosetta still installs. I run this in a policy:
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
The policy is set to: Ongoing and Enrollment
Trigger: installrosetta
I keep it ongoing in the event that I want to install rosetta from Terminal on any enrolled Silicon machine and it usually kicks off before the enrollment is complete.
12-21-2021 11:34 AM - edited 12-21-2021 11:35 AM
I'm on an M1 mini on Monterey. I have multiple Rosetta apps running. There is no "/Library/Apple/System/Library/LaunchDaemons/com.apple.oahd.plist", and there is no process with "oahd" running. There is a "/Library/Apple/usr/share/rosetta/" directory. Every Rosetta install script I have found so far looks for things that do not exist on my mini. At this point I'm not even convinced Apple will allow Rosetta to be command line installed anymore. It seems like unless someone is available to dismiss a GUI dialog box the install fails. Either way, none of the popular install scripts seem to work anymore.
Posted on 03-02-2022 12:31 PM
Has anyone found a solution for the error message regarding the Package Authoring Error?
Posted on 04-21-2022 11:32 PM
Have you found any solution? Please tell me.
Posted on 03-02-2022 12:33 PM
Have you found a solution that does not produce the error message yet?
Posted on 04-21-2022 11:32 PM
Have you found any solution ? Please help.
Posted on 03-10-2022 12:16 PM
I don't rely on the OS and oahd process, as Rosetta is for the Apple silicon chip. My script just looks for the processor. I haven't had any problem with it yet.:
Posted on 04-10-2022 06:22 AM
I've been having issues as well with Rosetta over the last week, it's just not getting installed properly by any jamf terminal command or script. So I made a pkg of the installer instead and deploy it at as the only pkg at enrolment to ensure it gets installed. To build the Rosetta pkg do this:
Download and install Rosetta 2:
softwareupdate --install-rosetta --agree-to-license
Find path to installer:
grep RosettaUpdateAuto.pkg /var/log/install.log
Copy installer for safekeeping:
cp /path/to/RosettaUpdateAuto.pkg /path/to/backup/dir/
Source: https://tinyapps.org/blog/202103270700_backup_rosetta2.html
04-19-2022 01:35 AM - edited 04-19-2022 01:37 AM
Managed to get hold of the RosettaUpdateAuto.pkg.
Quick question...
We currently run a script to determine if a device is M1 or not - if yes, then "softwareupdate --install-rosetta --agree-to-license". It's set to 'Enrolment'
If I were to create a policy that's set to 'Ongoing' with the RosettaUpdateAuto.pkg as a payload - if I call its trigger from inside our Enrolment script, will it be able to run the policy even though it hasn't finished running the Enrolment policies?
Via 'sudo jamf policy -trigger rosetta' (for example).
To summarise:
In the enrollment script, I'm suggesting replace "softwareupdate --install-rosetta --agree-to-license", with "sudo jamf policy -trigger rosetta"
'rosetta' being the trigger for a policy that is 'Ongoing'
Posted on 04-22-2022 03:58 PM
I excluded an m1 mac from the script on enrollment so that rosetta does not get installed that way anymore. Then I ran just the basic command shown below; same error. So it's not the script. I'm on jss version 10.36.1
/usr/sbin/softwareupdate --install-rosetta
Posted on 04-25-2022 04:47 AM
I do think Rosetta is installing via the old softwareupdate command, if it wasn't then following policies would've failed to run also (even stuff as standard as deploying basic desktop wallpapers).
I will still test deploying our own PKG though. I've seen our DEP script halt a couple of times on M1 Pro Max devices recently. I suspected it was related to our AntiVirus (because I've already recorrected the /usr/bin/python line). Just conscious that something has changed and would rather nothing was missing from Rosetta :D
Posted on 04-25-2022 04:56 PM
Support says that if the error is not causing an issue, it's not, then I can ignore it. So I will.
04-27-2022 05:51 PM - edited 04-27-2022 05:53 PM
What I do for M1 is:
(a) Have a policy run at enrollment complete that installs Rosetta, put 00 on it to make it run first depending on your policy workflow:
The log will look like this and @nikgio provided the Files and Processes info above.
Executing Policy 00-INSTALL ROSETTA M1 [CMD LINE] |
Running command /usr/sbin/softwareupdate --install-rosetta --agree-to-license... |
Result of command: 2022-04-21 17:01:07.214 softwareupdate[1593:10432] Package Authoring Error: 002-66270: Package reference com.apple.pkg.RosettaUpdateAuto is missing installKBytes attribute By using the agreetolicense option, you are agreeing that you have run this tool with the license only option and have read and agreed to the terms. If you do not agree, press CTRL-C and cancel this process immediately. Installing: 0.0% Installing: 0.0% Installing: 100.0% Installing: 100.0% Installing: -1.0% Installing: 2.0% Installing: 100.0% Install of Rosetta 2 finished successfully |
(b) I will also run a second package to deploy DEP Notify, along with the script and custom triggers.
This process has worked flawlessly on our M1 devices. I like the idea of creating a Rosetta package also, which @tommyandersson provided above. Both methods should be solid.
Disregard the installKBytes attribute message. It means absently nothing in regards to the result of Rosetta being deployed.