Skip to content

Instantly share code, notes, and snippets.

@jacktose
Created February 14, 2021 07:41
Show Gist options
  • Save jacktose/0f7251c261cb3ec63a3d271d186ed32d to your computer and use it in GitHub Desktop.
Save jacktose/0f7251c261cb3ec63a3d271d186ed32d to your computer and use it in GitHub Desktop.
linuxbrew gcc link conflicts
$ brew info gcc
gcc: stable 5.5.0 (bottled)
GNU compiler collection
https://gcc.gnu.org/
/data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc/5.5.0_7 (1,348 files, 174.7MB) *
Poured from bottle on 2020-12-27 at 17:15:28
From: https://github.com/Homebrew/linuxbrew-core/blob/HEAD/Formula/gcc.rb
License: GPL-3.0-or-later with GCC-exception-3.1
==> Dependencies
Required: gmp ✔, libmpc ✔, mpfr ✔, binutils ✔, glibc ✔, isl@0.18 ✔, zlib ✔
==> Analytics
install: 11,730 (30 days), 33,341 (90 days), 118,260 (365 days)
install-on-request: 7,732 (30 days), 22,428 (90 days), 83,825 (365 days)
build-error: 0 (30 days)
$ brew reinstall gcc
Error: No such file or directory - /data/shared/lusers/jacktose/.linuxbrew/bin/gcc
$ brew uninstall gcc
Uninstalling /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc/5.5.0_7... (1,348 files, 174.7MB)
$ brew cleanup
Removing: /usr/lusers/jacktose/.cache/Homebrew/gh--1.5.0.x86_64_linux.bottle.tar.gz... (5.6MB)
Warning: Skipping vim: most recent version 8.2.2500 not installed
Removing: /usr/lusers/jacktose/.cache/Homebrew/vim--8.2.2475.tar.gz... (14.7MB)
Pruned 2 symbolic links from /data/shared/lusers/jacktose/.linuxbrew
$ brew install gcc
Updating Homebrew...
==> Downloading https://linuxbrew.bintray.com/bottles/gcc%405-5.5.0_6.x86_64_linux.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/42/42f8f7e567c1baababdb35095b536610503d39511916f8854e70188e842b664b?__gda__=exp=1
######################################################################## 100.0%
==> Downloading https://linuxbrew.bintray.com/bottles/gcc-5.5.0_7.x86_64_linux.bottle.1.tar.gz
==> Downloading from https://akamai.bintray.com/8b/8bde377e3d9ca28bfa842583accbacfa912666e71ffb5de7cb401663ca894c25?__gda__=exp=1
######################################################################## 100.0%
==> Installing dependencies for gcc: gcc@5
==> Installing gcc dependency: gcc@5
==> Pouring gcc@5-5.5.0_6.x86_64_linux.bottle.tar.gz
==> Creating the GCC specs file: /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/../lib/gcc/5/gcc/x86_64-unknown
🍺 /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6: 1,347 files, 172.9MB
==> Installing gcc
==> Pouring gcc-5.5.0_7.x86_64_linux.bottle.1.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /data/shared/lusers/jacktose/.linuxbrew
Could not symlink bin/c++-5
Target /data/shared/lusers/jacktose/.linuxbrew/bin/c++-5
is a symlink belonging to gcc@5. You can unlink it:
brew unlink gcc@5
To force the link and overwrite all conflicting files:
brew link --overwrite gcc
To list all files that would be deleted:
brew link --overwrite --dry-run gcc
Possible conflicting files are:
/data/shared/lusers/jacktose/.linuxbrew/bin/c++-5 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/c++-5
/data/shared/lusers/jacktose/.linuxbrew/bin/cpp-5 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/cpp-5
/data/shared/lusers/jacktose/.linuxbrew/bin/g++-5 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/g++-5
/data/shared/lusers/jacktose/.linuxbrew/bin/gcc-5 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/gcc-5
/data/shared/lusers/jacktose/.linuxbrew/bin/gcc-ar-5 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/gcc-ar-5
/data/shared/lusers/jacktose/.linuxbrew/bin/gcc-nm-5 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/gcc-nm-5
/data/shared/lusers/jacktose/.linuxbrew/bin/gcc-ranlib-5 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/gcc-ranlib-5
/data/shared/lusers/jacktose/.linuxbrew/bin/gcov-5 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/gcov-5
/data/shared/lusers/jacktose/.linuxbrew/bin/gcov-dump-5 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/gcov-dump-5
/data/shared/lusers/jacktose/.linuxbrew/bin/gcov-tool-5 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/gcov-tool-5
/data/shared/lusers/jacktose/.linuxbrew/bin/gfortran-5 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/gfortran-5
/data/shared/lusers/jacktose/.linuxbrew/bin/x86_64-unknown-linux-gnu-c++-5 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/x86_64-unknown-linux-gnu-c++-5
/data/shared/lusers/jacktose/.linuxbrew/bin/x86_64-unknown-linux-gnu-g++-5 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/x86_64-unknown-linux-gnu-g++-5
/data/shared/lusers/jacktose/.linuxbrew/bin/x86_64-unknown-linux-gnu-gcc-5 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/x86_64-unknown-linux-gnu-gcc-5
/data/shared/lusers/jacktose/.linuxbrew/bin/x86_64-unknown-linux-gnu-gcc-5.5.0 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/x86_64-unknown-linux-gnu-gcc-5.5.0
/data/shared/lusers/jacktose/.linuxbrew/bin/x86_64-unknown-linux-gnu-gcc-ar-5 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/x86_64-unknown-linux-gnu-gcc-ar-5
/data/shared/lusers/jacktose/.linuxbrew/bin/x86_64-unknown-linux-gnu-gcc-nm-5 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/x86_64-unknown-linux-gnu-gcc-nm-5
/data/shared/lusers/jacktose/.linuxbrew/bin/x86_64-unknown-linux-gnu-gcc-ranlib-5 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/x86_64-unknown-linux-gnu-gcc-ranlib-5
/data/shared/lusers/jacktose/.linuxbrew/bin/x86_64-unknown-linux-gnu-gfortran-5 -> /data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6/bin/x86_64-unknown-linux-gnu-gfortran-5
Error: Could not symlink include/c++/5.5.0/algorithm
Target /data/shared/lusers/jacktose/.linuxbrew/include/c++/5.5.0/algorithm
is a symlink belonging to gcc@5. You can unlink it:
brew unlink gcc@5
To force the link and overwrite all conflicting files:
brew link --overwrite gcc@5
To list all files that would be deleted:
brew link --overwrite --dry-run gcc@5
$ brew info gcc
gcc: stable 5.5.0 (bottled)
GNU compiler collection
https://gcc.gnu.org/
/data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc/5.5.0_7 (1,341 files, 172.9MB)
Poured from bottle on 2021-02-13 at 23:25:14
From: https://github.com/Homebrew/linuxbrew-core/blob/HEAD/Formula/gcc.rb
License: GPL-3.0-or-later with GCC-exception-3.1
==> Dependencies
Required: gmp ✔, libmpc ✔, mpfr ✔, binutils ✔, glibc ✔, isl@0.18 ✔, zlib ✔
==> Analytics
install: 11,730 (30 days), 33,341 (90 days), 118,260 (365 days)
install-on-request: 7,732 (30 days), 22,428 (90 days), 83,825 (365 days)
build-error: 0 (30 days)
$ brew info gcc@5
gcc@5: stable 5.5.0 (bottled)
GNU Compiler Collection
https://gcc.gnu.org/
/data/shared/lusers/jacktose/.linuxbrew/Cellar/gcc@5/5.5.0_6 (1,347 files, 172.9MB) *
Poured from bottle on 2021-02-13 at 23:24:59
From: https://github.com/Homebrew/linuxbrew-core/blob/HEAD/Formula/gcc@5.rb
==> Dependencies
Required: gmp ✔, isl@0.18 ✔, libmpc ✔, mpfr ✔, zlib ✔, binutils ✔, glibc ✔
==> Requirements
Build: macOS ✔
==> Analytics
install: 238 (30 days), 442 (90 days), 1,127 (365 days)
install-on-request: 73 (30 days), 277 (90 days), 959 (365 days)
build-error: 0 (30 days)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment