Homebrew-core: Problem with installing/uninstalling/upgading clingo

Created on 22 Sep 2020  Â·  7Comments  Â·  Source: Homebrew/homebrew-core

Bug report

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • [x] ran brew update and can still reproduce the problem?
  • [x] ran brew doctor, fixed all issues and can still reproduce the problem?
  • [x] ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
  • [x] if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?

What you were trying to do (and why)

I am currently using macOS Catalina 10.15.6.
When updating my system with brew update; brew upgrade, I keep getting a clingo installation error.

Homebrew version and config:

$ brew config
HOMEBREW_VERSION: 2.5.2
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: cd4a3c0588abb82d916bc8558f4c157e951d449d
Last commit: 29 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 79e15ec819ea7886446b76b45ff9289e60d5326f
Core tap last commit: 2 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 4
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: quad-core 64-bit haswell
Clang: 11.0 build 1103
Git: 2.28.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 10.15.6-x86_64
CLT: 12.0.26.2
Xcode: 11.6

Output of brew doctor:

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
  /Applications/Postgres.app/Contents/Versions/latest/bin/gdal-config

What happened (include command output)

When upgrading my system with brew update; brew upgrade I get the following error:

$ brew update; brew upgrade
Already up-to-date.
==> Upgrading 1 outdated package:
clingo 5.4.0_1
==> Upgrading clingo -> 5.4.0_1
==> Downloading https://homebrew.bintray.com/bottles/clingo-5.4.0_1.catali
Already downloaded: /Users/Shinobi/Library/Caches/Homebrew/downloads/8db3ffaae10435d5283f856c10d77c32bce76df3634bb2a4437a21ff3d81b0ce--clingo-5.4.0_1.catalina.bottle.tar.gz
Error: clingo 4.5.4 is already installed
To upgrade to 5.4.0_1, run `brew upgrade clingo`.

I then tried to upgrade clingo and get:

$ brew upgrade clingo
==> Upgrading 1 outdated package:
clingo 5.4.0_1
==> Upgrading clingo -> 5.4.0_1
==> Downloading https://homebrew.bintray.com/bottles/clingo-5.4.0_1.catali
Already downloaded: /Users/Shinobi/Library/Caches/Homebrew/downloads/8db3ffaae10435d5283f856c10d77c32bce76df3634bb2a4437a21ff3d81b0ce--clingo-5.4.0_1.catalina.bottle.tar.gz
Error: clingo 4.5.4 is already installed
To upgrade to 5.4.0_1, run `brew upgrade clingo`.

I have tried to uninstall the package but I get the message:

$ brew uninstall clingo
Error: No installed keg or cask with the name "clingo"

So I tried to install clingo and get the error:

$ brew install clingo
==> Downloading https://homebrew.bintray.com/bottles/clingo-5.4.0_1.catali
Already downloaded: /Users/Shinobi/Library/Caches/Homebrew/downloads/8db3ffaae10435d5283f856c10d77c32bce76df3634bb2a4437a21ff3d81b0ce--clingo-5.4.0_1.catalina.bottle.tar.gz
Error: clingo 3.3.2 is already installed
To upgrade to 5.4.0_1, run `brew upgrade clingo`.

So I tried to reinstall clingo and get the error:

$ brew reinstall clingo
==> Downloading https://homebrew.bintray.com/bottles/clingo-5.4.0_1.catali
Already downloaded: /Users/Shinobi/Library/Caches/Homebrew/downloads/8db3ffaae10435d5283f856c10d77c32bce76df3634bb2a4437a21ff3d81b0ce--clingo-5.4.0_1.catalina.bottle.tar.gz
==> Reinstalling clingo
Error: clingo 3.3.2 is already installed
To upgrade to 5.4.0_1, run `brew upgrade clingo`.

There seems to be some problem with this package.

What you expected to happen

I expect to be able to either remove, install or upgrade clingo.
None of these options are currently working for me.

Step-by-step reproduction instructions (by running brew install commands)

As aforementioned, when I run brew update; brew upgrade I see:

==> Upgrading 1 outdated package:
clingo 5.4.0_1
==> Upgrading clingo -> 5.4.0_1
==> Downloading https://homebrew.bintray.com/bottles/clingo-5.4.0_1.catali
Already downloaded: /Users/Shinobi/Library/Caches/Homebrew/downloads/8db3ffaae10435d5283f856c10d77c32bce76df3634bb2a4437a21ff3d81b0ce--clingo-5.4.0_1.catalina.bottle.tar.gz
Error: clingo 4.5.4 is already installed
To upgrade to 5.4.0_1, run `brew upgrade clingo`.

But then when I try to upgrade/reinstall/install or remove clingo I am also told I cannot perform any of those actions as demonstrated above.

Most helpful comment

Try running brew uninstall clasp and brew uninstall gringo instead of clingo

All 7 comments

What does ls /usr/local/Cellar/clingo say?

$ ls /usr/local/Cellar/clingo
ls: /usr/local/Cellar/clingo: No such file or directory

That's weird, what about brew info clingo?

$ brew info clingo
clingo: stable 5.4.0 (bottled)
ASP system to ground and solve logic programs
https://potassco.org/
/usr/local/Cellar/clasp/3.3.2 (7 files, 1.5MB) *
  Poured from bottle on 2017-08-22 at 09:15:41
/usr/local/Cellar/gringo/4.5.4 (7 files, 5.6MB) *
  Poured from bottle on 2016-08-10 at 21:06:31
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/clingo.rb
License: MIT
==> Dependencies
Build: cmake ✘, doxygen ✘
Required: lua ✔, [email protected] ✔
==> Analytics
install: 456 (30 days), 1,678 (90 days), 9,032 (365 days)
install-on-request: 326 (30 days), 1,061 (90 days), 3,465 (365 days)
build-error: 0 (30 days)

Try running brew uninstall clasp and brew uninstall gringo instead of clingo

$ brew uninstall clasp
Uninstalling /usr/local/Cellar/clasp/3.3.2... (7 files, 1.5MB)

$ brew uninstall gringo
Uninstalling /usr/local/Cellar/gringo/4.5.4... (7 files, 5.6MB)

$ brew update; brew upgrade
Already up-to-date.

Nice 💪💥💥 so gringo was the culprit. I have no idea why that package was installed...

If I understand the output you posted correctly that used to be the name for clingo

Was this page helpful?
0 / 5 - 0 ratings

Related issues

faraazkhan picture faraazkhan  Â·  3Comments

Steffen911 picture Steffen911  Â·  3Comments

gregvirgin picture gregvirgin  Â·  3Comments

dredmorbius picture dredmorbius  Â·  3Comments

ralexx picture ralexx  Â·  4Comments