/opt/ BUILD ERROR fix for custom images

Insert this code into your build file before the install commands to fix the error where packages like chrome and brave try to install into /opt/ Credit to @fpfcmsr for this solution.

rm /opt # this was a symlink file not a directory
mkdir /opt # recreate the opt directory to enable packages to install in it

If you are attempting to install chrome, apparently, you need this script from @rrenomeron as well to get the correct keys during updates: ublue-tr/config/scripts/enable-chrome-yum-repo.sh at 5503da8d5c7db4cf349ea15ca023c3220d4f94e3 · rrenomeron/ublue-tr · GitHub

1 Like

Any particular reason for the mkdirs and lns? On Fedora Silverblue, all I had to do was add the repo and rpm-ostree install brave-browser.

Yes because this is being built on the image in the built.sh file not on the live system