Comments (8)
How are you running this? SSH?
from brew.
Steps to reproduce:
- launch iTerm2 on Mac
- ssh to the remote host
- run command
brew update
Same happens if I
- launch dcv-viewer and connect to the remote host
- launch a terminal
- run command
brew update
It worked before but just failed recently
from brew.
@azhongzl Can you reproduce on any other hosts or Linux machines? How long has this been happening? What user are you running as?
from brew.
How long has this been happening?
It worked before but just started to fail yesterday
What user are you running as?
I run with my own user but should have every permissions.
from brew.
Sounds like something weird is happening with the way your system interacts with herestrings.
I'm guessing changing
brew/Library/Homebrew/utils/lock.sh
Lines 50 to 52 in f0e442d
to be (echo "exit(RUBY_VERSION >= '1.8.7')" | "${ruby}" /dev/stdin)
might fix things? And similarly on the line below.
from brew.
Thanks @Bo98. So the issue is caused by using an old version of ruby.
/usr/bin/ruby
is hardcoded in above code.
brew/Library/Homebrew/utils/lock.sh
Line 42 in f0e442d
In my env, /usr/bin/ruby
is old
/usr/bin/ruby -v
ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
The one on the path is latest
ruby -v
ruby 2.7.8p225 (2023-03-30 revision 1f4d455848) [x86_64-linux]
Run with old ruby, there are errors:
/usr/bin/ruby /dev/stdin <<< "exit(RUBY_VERSION >= '1.8.7')"
/dev/stdin: No such file or directory - /tmp/zshFl0HSh (deleted) (Errno::ENOENT)
Run with latest ruby, no issues:
ruby /dev/stdin <<< "exit(RUBY_VERSION >= '1.8.7')"
Can brew code use the default ruby on path instead of hardcoding?
from brew.
Maybe, though ideally we'd fix 2.0 otherwise we would need to bump the 1.8.7 requirement (though the requirement check itself is broken which is not good).
There's perhaps also an argument of hoisting the flock
condition to the top:
brew/Library/Homebrew/utils/lock.sh
Lines 56 to 58 in f0e442d
from brew.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
from brew.
Related Issues (20)
- don't write .keepme in `bin` and `sbin` if it isn't needed HOT 1
- brew update --greedy: Parameter 'message': Expected type String, got type OptionParser::InvalidOption with value #<OptionParser::InvalidOption: --greedy> HOT 1
- `HOMEBREW_GITHUB_API_TOKEN` doesn't apply for call to `https://api.github.com/repos/org/name/releases/latest` HOT 2
- Homebrew formula has linkage issue on Apple silicon setup for python application with selenium as dependency HOT 5
- Support user set BUNDLE_USER_CACHE HOT 14
- Consider getting superenv from `/etc/profile` and `/etc/environment` HOT 5
- SBOMs break bottle reproducibility HOT 18
- Improve caveats handling for API installs HOT 8
- Migration to other tap broken HOT 10
- Replace PAT usage with GitHub App Tokens HOT 1
- Use `main` for Homebrew branches HOT 4
- Use Sorbet `typed: strict` in all (non-package) files in Homebrew organisation
- Attestation failure message emits secret HOT 1
- Spurious linkage errors to GCC on Linux HOT 7
- Formula should be able to depend on cask HOT 2
- HOMEBREW_NO_INSTALL_FROM_API not working for dependencies with bottle HOT 3
- HEAD-only formulae can no longer be installed HOT 1
- Can't find socket when using emacsclient as homebrew editor HOT 10
- Brew commands autocomplete doesn't work HOT 5
- Reinstall happening even when downloaded artifact is the same HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brew.