Unable to install agda via homebrew in mac os x M1 chip - agda

I was following the instruction here and it said to do:
brew install agda
agda-mode setup
I believe it should be working since I was able to compile the hello-world.agda and run the binary executable with ./hello-world.
But the output says there are error:
(meta_learning) brandomiranda~ ❯ brew install agda
Warning: No available formula with the name "agda".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
In fact, I don't know what changed since my last compilation of hello world but indeed I cannot compile it (and thus run it) anymore:
(meta_learning) brandomiranda~/coq4brando/cs598 ❯ agda --compile hello-world.agda
/Users/brandomiranda/.agda/libraries:1: Failed to read library file /usr/local/lib/agda/standard-library.agda-lib.
Reason: /usr/local/lib/agda/standard-library.agda-lib: openFile: does not exist (No such file or directory)
Why? Does someone know how to fix this?

Related

brew install specific version of a package fails

For my project, I need to install a specific version of the icu4c package. I used to follow the instructions written in this answer and it was working. However, recently, when I needed to do the same, it failed with the following error
Error: icu4c: undefined method `cellar' for #<BottleSpecification:0x00007fa0d75096a8>
After some investigations, I concluded that brew has new style of .rb files and old versions may not be compatible. To fix it, I run brew style --fix icu4c.rb which seemed to fix the style issues. However, now, I got the following error:
Error: Failed to load cask: ./icu4c.rb
Cask 'icu4c' is unreadable: wrong constant name #<Class:0x00007fa68d2d9278>
Warning: Treating ./icu4c.rb as a formula.
==> Downloading https://ghcr.io/v2/homebrew/core/icu4c/manifests/67.1
#=#=#
curl: (22) The requested URL returned error: 404
Error: Failed to download resource "icu4c_bottle_manifest"
Download failed: https://ghcr.io/v2/homebrew/core/icu4c/manifests/67.1
I saw a number of places that this might be due to curl or xcode command line tools. I updated both of them but could not proceed further. Any help would be greatly appreciated.

Trying to install youtube-dl but it shows an error

~ % brew install youtube-dl
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "youtube-dl".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
Try brew update first.
If the problem persists, please share the output for brew doctor, it shows the problem with solutions.

Unable to install the thrift compiler while running the command "brew install thrift#0.12"

Unable to install the thrift compiler while running the command "brew install thrift#0.12"
I get the below error:
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.```
Can someone suggest an alternative or a fix?

I'm trying to install the Arabic data on Tesseract, but when I do, it gives me this:

I'm trying to install the Arabic data on Tesseract using Terminal using this command. I have homebrew installed
brew install tesseract-ocr-[ara]
But I keep getting this error.
Any thoughts?
Error: No available formula with the name "tesseract-ocr-[ara]"
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
It suggested that I do a deeper clone since I had only done a shallow clone, so I did that, but it still gave me this same result.
brew info tesseract says:
tesseract: stable 4.1.0 (bottled), HEAD
OCR (Optical Character Recognition) engine
https://github.com/tesseract-ocr/
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/tesseract.rb
==> Dependencies
Build: autoconf, autoconf-archive, automake, libtool, pkg-config
Required: leptonica, libtiff
==> Options
--HEAD
Install HEAD version
==> Caveats
This formula contains only the "eng", "osd", and "snum" language data files.
If you need all the other supported languages, `brew install tesseract-lang`.
This suggests that you need to run brew install tesseract-lang.

Octave Fontconfig error

I installed Octave via Homebrew using the instructions given here.
When I try to generate a plot, I get the following message:
Fontconfig error: Cannot load default config file
warning: could not match any font: *-normal-normal-10
warning: called from
axes at line 66 column 10
gca at line 58 column 9
newplot at line 148 column 8
surf at line 70 column 9
sombrero at line 65 column 5
I then get a long series of the following messages:
warning: ft_render: unable to load appropriate font
warning: could not match any font: *-normal-normal-10
Usually the plot appears once, but if I call it again then Octave quits with the following message.
panic: Segmentation fault: 11 -- stopping myself...
attempting to save variables to 'octave-workspace'...
warning: unable to open 'octave-workspace' for writing...
warning: called from
__gnuplot_drawnow__>gnuplot_trim_term at line 368 column 10
__gnuplot_drawnow__>gnuplot_set_term at line 119 column 20
__gnuplot_drawnow__ at line 84 column 16
Segmentation fault: 11
In discussions of similar errors I have often seen references to /etc/fonts/fonts.conf. My /etc directory does not contain a fonts subdirectory. This may be the source of the problem, but I do not know how to fix it. When I run, brew install fontconfig, I get Warning: fontconfig-2.11.1_1 already installed. When I run sudo find / -name fonts.conf, I get /opt/X11/lib/X11/fontconfig/fonts.conf.
brew doctor produces the following warnings, which may be relevant and which I do not know how to fix (short of uninstalling Anaconda):
Warning: Anaconda is known to frequently break Homebrew builds, including Vim
and MacVim, due to bundling many duplicates of system and Homebrew-available
tools.
If you encounter a build failure please temporarily remove Anaconda
from your $PATH and attempt the build again prior to reporting the
failure to us. 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 what 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:
/Users/greg/anaconda/bin/curl-config
/Users/greg/anaconda/bin/freetype-config
/Users/greg/anaconda/bin/libdynd-config
/Users/greg/anaconda/bin/libpng-config
/Users/greg/anaconda/bin/libpng16-config
/Users/greg/anaconda/bin/python-config
/Users/greg/anaconda/bin/python2-config
/Users/greg/anaconda/bin/python2.7-config
/Users/greg/anaconda/bin/xml2-config
/Users/greg/anaconda/bin/xslt-config
I am running OS X 10.11.3 (El Capitan).
try
brew uninstall fontconfig
brew install fontconfig --universal
if you don't have or don't want to use xquartz, you can use qt
brew uninstall gnuplot
brew install gnuplot --with-qt
Actually, it's not an issue of Octave, but of its complicated setup and misconfiguration of other utilities (especially fontconfig).
For proper work you need to set manually path for fontconfig, so it wouldn't look for fonts in inappropriate directory (/etc/fonts works for Linux installations, but OS X XQuartz goes to different place).
You should run command export FONTCONFIG_PATH=/opt/X11/lib/X11/fontconfig to setup fontconfig proper way. Also you can add line export FONTCONFIG_PATH=/opt/X11/lib/X11/fontconfig to your ~/.bash_profile and restart your terminal, so you don't need to run this command anymore.

Resources