I have a problem with my gcc installation from Homebrew.
homebrew install gcc
produces
Warning: The post-install step did not complete successfullyYou can try again using: brew postinstall gcc
brew postinstall gcc
produces
==> Postinstalling gccWarning: The post-install step did not complete successfullyYou can try again using: brew postinstall gcc
gcc --version
seems to have gcc version 11.3:
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
gcc-12 --version
gives this error:
-bash: /home/linuxbrew/.linuxbrew/bin/gcc-12: Bad address
Because of this, many packages that are depended on gcc cannot run properly. Also, tried to install packages in R also fail. I tried reinstalling through homebrew with no success. Similarly, running sudo apt-get install --reinstall gcc
did not solve the problem.
Of note, I am running Ubuntu under WSL:
WSL version: 1.0.3.0Kernel version: 5.15.79.1WSLg version: 1.0.47MSRDC version: 1.2.3575Direct3D version: 1.606.4DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hypWindows version: 10.0.19044.2364Distributor ID: UbuntuDescription: Ubuntu 22.04.1 LTSRelease: 22.04Codename: jammyecho $PATH/home/linuxbrew/.linuxbrew/opt/dpkg/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/osekulovic/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files (x86)/DNASTAR/Lasergene 17/SeqNinjaCL:/mnt/c/Program Files (x86)/DNASTAR/Lasergene 17/ArrayStar:/mnt/c/Program Files (x86)/DNASTAR/Lasergene 17:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files (x86)/Pandoc/:/mnt/c/Users/sekulo/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/sekulo/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin
Running which gcc
produces
/usr/bin/gcc
Running which gcc-12
produces
/home/linuxbrew/.linuxbrew/bin/gcc-12
Any help is greatly appreciated.TP