Upgrading to Mac OS Big Sur as a Developer
The Mac OS Big Sur upgrade notification had been sitting in my App Store icon for many weeks. One time I decided to upgrade, I didn’t have enough disk space. After making mandatory Google searches regarding stability/reliability of the upgrade, I decided to finally plunge in and upgrade. My previous upgrades to Mohave and Catalina had been relatively painless, unlike this time.
A. Before
1. Making Enough Disk Space Available
The upgrade requires 35.5GB of available storage.
Open “Storage Management” and delete unnecessary files. I had 20GB of files stored in the Developer cache from the previous downloads of Xcode.
2. Take Backups
Since the upgrade process may go wrong and make your computer unusable.
B. During
Upgrade may require many hours. Make sure you have power connected the entire time.
C. After
1. Apache NetBeans Failed to Launch
After some troubleshooting, it turns out that it wasn’t pointing to the correct JDK path.
Run the following command to determine JDK path
/usr/libexec/java_home -- v
In my case, the output was
% /usr/libexec/java_home -- /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home
Locate the netbeans.conf
file inside the contents of NetBeans app. In my case it was at/Applications/NetBeans/Apache\ NetBeans\11.0.app/Contents/Resources/NetBeans/etc/netbeans.conf
. Point the property netbeans_jdkhome
to the correct JDK path, and relaunch NetBeans.
2. FortiClient VPN Client Failed to Connect to IPSEC VPN
Big Sur comes with some native VPN upgrades and may conflict with non-native VPN clients. I managed to make FortiClient VPN client work after installing version 6.4 from https://d3gpjj9d20n0p3.cloudfront.net/forticlient/downloads/FortiClient_6.4.2.1305_macosx.dmg.
3. Google Chrome and Brave Browsers Randomly Crashing
The problem started with some webpages “Aw, Snap”ing very frequently.
Sometimes relaunching the browser one or many times fixed the error. At one point, Chrome failed to launch at all. Googling led to the articles asking to reinstall the browser, which was too drastic a solution.
It turned out that my Chrome based browsers were crashing with because of “Too many open files in system”
Checked the limit
% sysctl -A | grep kern.maxfiles
kern.maxfiles: 10240
kern.maxfilesperproc: 10240
To increase the limit permanently, I followed the instructions from this post and created a file limit.maxfiles.plist
in the folder /Library/LaunchDaemons/
with chmod
to 644
, and chown
to the root
user, with the following contents
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>limit.maxfiles</string>
<key>ProgramArguments</key>
<array>
<string>launchctl</string>
<string>limit</string>
<string>maxfiles</string>
<string>64000</string>
<string>524288</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceIPC</key>
<false/>
</dict>
</plist>
Used plutil
to validate the file
plutil limit.maxfiles.plist
Loaded the plist
for now and future reboots
sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist
Rechecked the maxfiles
and maxfilesperproc
limits
% sysctl -A | grep kern.maxfiles
kern.maxfiles: 524288
kern.maxfilesperproc: 64000
No more “Aw, Snap!” so far.
4. Custom Desktop Background
I have my Desktop background pointing to a folder of images. This didn’t carry over to Big Sur. I had to reconfigure the Desktop background pictures folder under “System Preferences” -> “Desktop & Screen Saver”
5. Reindex Locate Database
After upgrading I wasn’t able to run locate
command, and I had to reindex locate database using the command
sudo /usr/libexec/locate.updatedb
Alternatively, we can run
sudo launchctl load -w /Library/LaunchDaemons/com.apple.locate.plist
6. Reconfigure Apache HTTPD and PHP
After upgrading, all installed modules in my httpd.conf
were removed. I had to re-enable PHP module.
To locate httpd.conf
, run
locate httpd.conf
My httpd.conf
was located at /private/etc/apache2/httpd.conf
. I uncommented the relevant modules in the file and restarted Apache HTTPD
sudo apachectl restart
7. Update Native Node Modules
After upgrading, node-sass
Node module stated throwing errors. After some googling I tried to rebuild it using
npm rebuild node-sass
However, it didn’t work.
I realised that I was using Node 12, and I needed to upgrade node-sass
to corresponding version 4.12.
8. Update Command Line Tools
After upgrading, Homebrew started throwing this error sometimes:
Error: Your Command Line Tools (CLT) does not support macOS 11.
The solution was to reinstall CLT
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install