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.
Related Issues (20)
- Allow macos 11 to be used HOT 1
- Allow formulae to set an env for their completion generation HOT 4
- Show disk space in info command HOT 3
- Fine-grained PATs do not work when used as $HOMEBREW_GITHUB_API_TOKEN HOT 3
- `brew upgrade -g` sometime will install old version app HOT 3
- `brew upgrade -g` sometime will install old version app
- @PizzaShift @ligi Hello.
- Support GitHub App installation access tokens HOT 2
- How should we store installed cask information? HOT 18
- Integrating attestation verification into `brew install` (and `brew verify`) HOT 17
- `brew bump --open-pr` fails to fetch repology data HOT 5
- Add a RuboCop rule for sorting EnvConfig keys
- Make `update <formula>` actually `upgrade formula` HOT 2
- `brew info` should always print whether formula installed HOT 5
- `cask upgrade` will be downloaded and installed repeatedly HOT 10
- `brew log` regression after port to `abstract_command` HOT 1
- option to install package to home directory or a custom directory HOT 1
- Running the macOS installer changes permissions on `~/.gitconfig` HOT 5
- Introduce additional versioning information for casks HOT 6
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.