Closed alexjcwitsil closed 1 year ago
I'll take a look, though if there is a way for you to clear your homebrew caches (probably is, I just don't know the command off the top of my head), you might try that - homebrew recently updated to version 4, which changed to "Using JSON files downloaded from formulae.brew.sh for package installation rather than local homebrew/core and homebrew/cask taps." (https://brew.sh/2023/02/16/homebrew-4.0.0/). The path shown seems to be referencing the homebrew-core tap, so if your homebrew was recently updated, perhaps that has something to do with it. Or not.
I'll try to get to this by early next week or so.
Hi Israel! Thanks for the quick response. I did a brew update
and brew upgrade
to try and ensure I am using the most up-to-date software/repos/package manager yet I am still getting the same error as before
Error: An exception occurred within a child process:
FormulaUnavailableError: No available formula with the name "/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/shtools.rb".
Thanks again for helping me solve this issue. Hope all is well :)
I tested this, first on two machines that had already had avog2s installed via homebrew before (by uninstalling avog2s and shtools), and then on a "clean" machine created by completely removing homebrew and installing from scratch. In all cases, avog2s installed without issue, leading me to think that the problem is either something with the specific OS you are running (perhaps shtools isn't compatible with the MacOS version you are running?) or else something is wrong with your homebrew install. Both are just guesses though...
Oh interesting. I should have mentioned before I am running Ubuntu (20.04.5 LTS (GNU/Linux 5.4.0-144-generic x86_64)). I know homebrew was made for a mac OS, but (with your help) I know I have previously been able to install avog2s on an ubuntu machine. Any suggestions as how I could start troubleshooting?
Not sure if this is related but I tried installing shtools separately by following the directions here: https://shtools.github.io/SHTOOLS/index-fortran.html by running
brew tap shtools/shtools
brew install shtools
but got the error:
libtool: error: unrecognised option: '-o'
Again, not sure if that is at all enlightening. Thanks again for helping me with this!
What do you get if you run brew info shtools
? One thing that jumps out at me: you did a brew tap shtools/shtools
. In none of my tests did I need to do that - thought that might be a difference between Mac and Linux. Perhaps try brew untap shtools/shtools
then try the brew install
again? Using the tap may be giving you an older, no longer functioning, version.
Here's what I get when I run brew info shtools
:
israel@Israels-Mac-Studio homebrew-avo % brew info shtools
==> Downloading https://formulae.brew.sh/api/formula.jws.json
######################################################################## 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
######################################################################## 100.0%
==> shtools: stable 4.10.1 (bottled), HEAD
Spherical Harmonic Tools
https://shtools.github.io/SHTOOLS/
/opt/homebrew/Cellar/shtools/4.10.1 (162 files, 19MB) *
Poured from bottle using the formulae.brew.sh API on 2023-03-03 at 13:01:02
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/shtools.rb
License: BSD-3-Clause
==> Dependencies
Required: fftw ✔, gcc ✔, openblas ✔
==> Options
--HEAD
Install HEAD version
==> Analytics
install: 7 (30 days), 33 (90 days), 203 (365 days)
install-on-request: 7 (30 days), 33 (90 days), 198 (365 days)
build-error: 0 (30 days)
israel@Israels-Mac-Studio homebrew-avo % brew untap shtools/shtools
Error: No available tap shtools/shtools.
israel@Israels-Mac-Studio homebrew-avo %
Notice also that the untap
attempt failed, indicating (I think) that it was never tapped.
I'll see about testing on linux tomorrow.
Thanks for the suggestions, Israel. I untapped shtools/shtools with:
brew untap shtools/shtools
Then ran brew info shtools
which gave the following output:
(base) awitsil@ARD-FAUCI:~$ brew info shtools
==> shtools: stable 4.10.1, HEAD
Spherical Harmonic Tools
https://shtools.github.io/SHTOOLS/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/shtools.rb
License: BSD-3-Clause
==> Dependencies
Build: libtool ✔
Required: fftw ✔, gcc ✔, openblas ✔, glibc ✔
==> Options
--HEAD
Install HEAD version
==> Analytics
install: 7 (30 days), 33 (90 days), 203 (365 days)
install-on-request: 7 (30 days), 33 (90 days), 198 (365 days)
build-error: 0 (30 days)
However, I am still getting the same error when I run brew install avog2s
which is:
==> Installing ibrewster/avo/avog2s dependency: shtools
Error: An exception occurred within a child process:
FormulaUnavailableError: No available formula with the name "/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/shtools.rb".
Let me know if you experience a similar issue in your ubuntu environment and, again, thanks for all your effort!
I was able to re-produce the shtools install issue on my linux box, and have reported it to the shtools project: https://github.com/SHTOOLS/SHTOOLS/issues/377#issue-1613970258
Hopefully they'll be able to fix the problem, and in doing so restore the ability to install avog2s via homebrew. We'll see what happens.
Just to keep you informed, it turns out there is a fairly easy change to the shtools makefile - comment out one line, and uncomment a couple of others - that allows it to build and install correctly. I have not yet, however, found an easy way to make that edit in homebrew - it insists on using the version it downloaded, and if you try to change it, complains about a SHA256 mismatch. The existence of this easy fix, however, is at least promising.
HI Israel, while waiting for a response to the issue you posted in SHTOOLS, I took your advice and edited the SHTOOLS src/Makefile and was able to successfully run make Fortran
. However, and apologies for my ignorance, I am stumped as what to do next. Did the make
command generate executables that I need to add to my $PATH? What are the next steps needed to make sure the manually installed SHTOOLS are recognized when I run brew install avog2s
? Again, sorry for my naivete and thanks so much for your help!
No, you aren't being Naïve - I never did figure out how to make that edit as part of a homebrew install. That said, since the author of the tool doesn't seem to know how to fix things, I took the liberty of creating a modified shtools install formula and including it in the avog2s install. As such, a simple brew install avog2s
should now work properly on linux.
Hopefully this is a temporary workaround, but for now, it should get things working again.
Eureka!! Thanks so much Israel! Your updated formula downloads/installs like a charm. Thanks so much for taking the time to help with this. Feel free to close the issue unless you want to wait until SHTOOLS is updated. I can't wait to start building some atmospheres :) Thanks again!!
running
brew install avog2s
gives the following error:Not sure if it is relevant but I looked at the SHTOOLS GitHub page (https://github.com/SHTOOLS/homebrew-shtools) where it states, "The homebrew tap is no longer supported."
I am not a
brew
expert but I hope there is a way to keep usingbrew
to install avog2s because it is A LOT easier than the alternative! Thanks for any help!