After updating to MacOS Mojave, I get an error when compiling with gfortran.
gfortran: warning: couldn’t understand kern.osversion ‘18.0.0
ld: library not found for -lcrt1.o
collect2: error: ld returned 1 exit status
This error did not occur before the update. I tracked similar threads and followed their proposed solutions. However, I got further errors when following ...
- Update XCode: Now updated to version 10.0.
Run
xcode-select --install
: I get the following error:xcode-select: error: command line tools are already installed, use "Software Update" to install updates
. Following this thread, I didsoftwareupdate --list
and getNo new software available.
. I conclude, that XCode updating is not the problem here. I also made sure that additional tools are installed upon first opening the updated XCode.Following this thread, where a similar error was reported, I did
brew doctor
. Something goes wrong here. I getWarning: Your Xcode (1) is outdated; Please update to Xcode 7.1.
Apparently it doesn't recognise to confirmed fact that my XCode is at 10.0. What can be done about that?Following this thread, I did
brew upgrade gcc
and get this error:Warning: You are using OS X 10.14.; ...
.With so many brewing errors, I checked the brew troubleshooting site, and followed their recommendations. I did
cd /usr/local && sudo chown -R $(whoami) bin etc include lib sbin share var opt Cellar Caskroom Frameworks
and againbrew update
and get this error:Error: The /usr/local directory is not writable. ...
. Following the recommendation in the error message, I didsudo chown -R $(whoami):admin /usr/local
but get the errorchown: /usr/local: Operation not permitted
.brew reinstall gcc
sounds like I would get the same error as in the previous point. Haven't tried so far, worrying for making the mess even worse.
Bottom line: I drowned in errors and see no solution. Any ideas what's the problem and how to solve it are appreciated!