31

Followed this tutorial in installing qt5.5 on a macOS version 10.13.6 High Sierra. Failed when trying to brew install qt@5.5 giving me an error below:

Error: qt@5.5: unknown version :mountain_lion

Versions:

  • brew
    Homebrew 2.0.0
    Homebrew/homebrew-core (git revision 175af; last commit 2019-02-02)
    Homebrew/homebrew-cask (git revision 05a81; last commit 2019-02-02)

  • macOS version 10.13.6 High Sierra

any help?

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
houdinisparks
  • 1,180
  • 1
  • 10
  • 16

1 Answers1

52

Referring to the tutorial, the following steps are executed to install qt@5.5

brew update
cd $( brew --prefix )/Homebrew/Library/Taps/homebrew/homebrew-core

# below is the last commit containing qt@5.5 with homebrew
git checkout 9ba3d6ef8891e5c15dbdc9333f857b13711d4e97 Formula/qt@5.5.rb

# here is where the error occurs
brew install qt@5.5

Solution

turns out line 25 of qt@5.5.rb formula file checked out in the command ( as seen in the referred tutorial)

git checkout 9ba3d6ef8891e5c15dbdc9333f857b13711d4e97 Formula/qt@5.5.rb

is causing this problem. commenting it out fixes the issue

enter image description here

calasyr
  • 346
  • 2
  • 7
houdinisparks
  • 1,180
  • 1
  • 10
  • 16
  • @ChrisHough what is the error you see when you run `brew install qt@5.5` after commenting out line 25 of the file mentioned above? – houdinisparks Feb 10 '19 at 10:05
  • 16
    I was finding it difficult to find the actual file. On my device, it is located in `/usr/local/opt/qt@5.5/.brew` and I had to comment out line #69 – AshNaz87 Mar 05 '19 at 09:44
  • @AshNaz87 .brew is empty for me, is there another location? – Chris Hough Mar 17 '19 at 01:59
  • @ChrisHough .brew is a dot directory. What do you get hit `ls -a` (in the qt@5.5 directory)? – AshNaz87 Mar 18 '19 at 12:50
  • 4
    @AshNaz87 I was able to find it at /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/qt@5.5.rb however, I have noticed this disappear when I run brew update and brew upgrade – Chris Hough Mar 22 '19 at 15:26
  • 1
    /usr/local/opt/qt@5.5/.brew/qt@5.5.rb Look for depends_on - Line 16 for me – Ken J Apr 11 '19 at 17:23
  • 1
    This works for me too, but as @ChrisHough mentioned, the problem reoccurs after running brew update. – Kris Khaira Jun 22 '19 at 17:49