I’m running on MacOS 13.5.2, but started old and has been upgraded through the years (don’t know if that’s relevant but it might be). I’ve just installed crystal first via asdf
and then, after that didn’t work, via homebrew.
In both cases, I’ve been trying to run a simple puts "Hello, world"
via crystal hello.cr
(and, later, via crystal eval 'puts "Hello, World"'
). However, I keep getting this error:
Unable to get file info: '/usr/local/bin/dsymutil': Permission denied (File::AccessDeniedError)
from /opt/homebrew/Cellar/crystal/1.9.2/bin/crystal in 'raise<File::Error+>:NoReturn'
from /opt/homebrew/Cellar/crystal/1.9.2/bin/crystal in 'Crystal::System::File::info?<String, Bool>:(File::Info | Nil)'
from /opt/homebrew/Cellar/crystal/1.9.2/bin/crystal in 'Process::file_executable?<Path>:Bool'
from /opt/homebrew/Cellar/crystal/1.9.2/bin/crystal in 'Process::find_executable<String>:(String | Nil)'
from /opt/homebrew/Cellar/crystal/1.9.2/bin/crystal in 'Crystal::Compiler#codegen<Crystal::Program, Crystal::ASTNode+, Array(Crystal::Compiler::Source), String>:(Tuple(Array(Crystal::Compiler::CompilationUnit), Array(String)) | Nil)'
from /opt/homebrew/Cellar/crystal/1.9.2/bin/crystal in 'Crystal::Compiler#compile:combine_rpath<Array(Crystal::Compiler::Source), String, Bool>:Crystal::Compiler::Result'
from /opt/homebrew/Cellar/crystal/1.9.2/bin/crystal in 'Crystal::Compiler#compile:combine_rpath<Array(Crystal::Compiler::Source), String, Bool>:Crystal::Compiler::Result'
from /opt/homebrew/Cellar/crystal/1.9.2/bin/crystal in 'Crystal::Command#eval:NoReturn'
from /opt/homebrew/Cellar/crystal/1.9.2/bin/crystal in '__crystal_main'
from /opt/homebrew/Cellar/crystal/1.9.2/bin/crystal in 'main'
Error: you've found a bug in the Crystal compiler. Please open an issue, including source code that will allow us to reproduce the bug: https://github.com/crystal-lang/crystal/issues
Now, I know that dsymutil
does not live in /usr/local/bin
. It lives in /usr/bin
. I see /usr/local/bin
in my PATH but nowhere else in my environment variables. I don’t see it anywhere in homebrew’s Formula. I don’t know where this is being specified. The question is twofold:
- Why is crystal assuming it lives in /usr/local/bin instead of trying to locate?
- How can I change this assumption?