Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

1 votes
1 answers
799 views
again.... bash version mac didn't change
On MacOS I installed `bash` with: ```none brew install bash ``` That created `/usr/local/Cellar/bash/5.0.18/bin/bash` The command `which -a bash` reports only `/bin/bash`. If I close the terminal, reboot, etc. I see the same output. I added the new bash to `/etc/private/shells`, then changed my defa...
On MacOS I installed bash with:
brew install bash
That created /usr/local/Cellar/bash/5.0.18/bin/bash The command which -a bash reports only /bin/bash. If I close the terminal, reboot, etc. I see the same output. I added the new bash to /etc/private/shells, then changed my default shell to the new version of bash:
sudo vim /private/etc/shells # added new bash 5.0.18 path
chsh -s /usr/local/Cellar/bash/5.0.18/bin/bash
Then I rebooted, but I still see:
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
Copyright (C) 2007 Free Software Foundation, Inc.
What's wrong?
Aleksandr Lebedev (113 rep)
Aug 11, 2020, 12:07 AM • Last activity: Aug 11, 2024, 08:59 AM
-5 votes
1 answers
412 views
How to access git repository whilst using brew command?
I am trying to install a package using brew but it is asking for Github username and password and failing to authenticate the connection even though I have added the ssh key to the Github. Can you suggest a way to fix this issue? Here's the response in terminal: fam007e@DarkKnightz:~$ brew tap owasp...
I am trying to install a package using brew but it is asking for Github username and password and failing to authenticate the connection even though I have added the ssh key to the Github. Can you suggest a way to fix this issue? Here's the response in terminal: fam007e@DarkKnightz:~$ brew tap owasp-amss/amass Running brew update --auto-update... ==> Tapping owasp-amss/amass Cloning into '/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/owasp-amss/homebrew-amass'... Username for 'https://github.com ': fam007e Password for 'https://fam007e@github.com ': remote: Support for password authentication was removed on August 13, 2021. remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication. fatal: Authentication failed for 'https://github.com/owasp-amss/homebrew-amass/ ' Error: Failure while executing; git clone https://github.com/owasp-amss/homebrew-amass /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/owasp-amss/homebrew-amass --origin=origin --template= --config core.fsmonitor=false exited with 128. fam007e@DarkKnightz:~$ ssh -T git@github.com Hi fam007e! You've successfully authenticated, but GitHub does not provide shell access.
DarKnightz (61 rep)
Feb 16, 2024, 02:50 PM • Last activity: Feb 16, 2024, 03:21 PM
0 votes
2 answers
1506 views
I have to run eval $(/opt/homebrew/bin/brew shellenv) every time I start my pc for the terminal to recognise it
I use the Fish shell on OSX and installed brew. Now I notice everytime I start my mac I need to run the `eval $(/opt/homebrew/bin/brew shellenv)` command again to make it recognice brew. I also noticed that my fish in my vs code does not recognises it untill I run the same command in vscode terminal...
I use the Fish shell on OSX and installed brew. Now I notice everytime I start my mac I need to run the eval $(/opt/homebrew/bin/brew shellenv) command again to make it recognice brew. I also noticed that my fish in my vs code does not recognises it untill I run the same command in vscode terminal. Is there somewhere it is not saving my path variables or something like it?
Wout Junius (1 rep)
Nov 2, 2023, 09:44 AM • Last activity: Nov 2, 2023, 10:27 PM
0 votes
1 answers
307 views
Homebrew in Ubuntu getting uninstalled after reboot
I am installing properly Homebrew in my ubuntu 22.04 and everything is fine brew doctor, brew --version everything is running properly. But everytime I am rebooting my system, the homebrew is getting uninstalled I dont know why this is happening. Please someone suggest a solution
I am installing properly Homebrew in my ubuntu 22.04 and everything is fine brew doctor, brew --version everything is running properly. But everytime I am rebooting my system, the homebrew is getting uninstalled I dont know why this is happening. Please someone suggest a solution
user569364 (1 rep)
Nov 21, 2022, 05:54 PM • Last activity: Jul 27, 2023, 07:29 PM
1 votes
1 answers
2870 views
After restarting terminal, Brew commands not working and getting some error in terminal
I have macOS Monterey(v12.3) and had installed brew with exact guidelines shown in youtube videos. But brew commands work only if I run in the same terminal session. When I restart the terminal and try to run the brew command it shows the following error: zsh: command not found: brew I have tried to...
I have macOS Monterey(v12.3) and had installed brew with exact guidelines shown in youtube videos. But brew commands work only if I run in the same terminal session. When I restart the terminal and try to run the brew command it shows the following error: zsh: command not found: brew I have tried to install the brew multiple time but every time same thing happens. I am new to MacOS. Please help. screenshot
Saurabh (13 rep)
Sep 4, 2022, 06:01 AM • Last activity: Mar 8, 2023, 11:41 AM
0 votes
1 answers
964 views
Brew no longer works - macOs 12.6
I work on macOs monterey 12.6 with a M1 pro chip. I was working on a project with php (8.1), composer and symfony installed and everything was working fine. I closed my terminal and since when I go back to my folder with my terminal, nothing works anymore. example : php -v -bash: php: command not fo...
I work on macOs monterey 12.6 with a M1 pro chip. I was working on a project with php (8.1), composer and symfony installed and everything was working fine. I closed my terminal and since when I go back to my folder with my terminal, nothing works anymore. example : php -v -bash: php: command not found composer env: php: No such file or directory and since even impossible to reinstall php.
brew install php@8.1
fatal: Could not resolve HEAD to a revision
Running brew update --auto-update...
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations 

==> Auto-updated Homebrew!
Updated 2 taps (shivammathur/php and homebrew/cask).
==> New Casks
pictureview

Warning: No available formula with the name "httpd" (dependency of shivammathur/php/php).
==> 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.
I don't understand, do you know where this could come from and how to solve the problem? my brew config :
brew config
HOMEBREW_VERSION: 3.6.2
ORIGIN: https://github.com/Homebrew/brew 
HEAD: b8b195cc64a29595797651720ebb2ea09affb682
Last commit: 4 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core 
Core tap HEAD: (none)
Core tap last commit: never
Core tap branch: HEAD
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 14.0.0 build 1400
Git: 2.37.0 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.6-arm64
CLT: 14.0.0.0.1.1661618636
Xcode: N/A
Rosetta 2: false
Cedric Petetin (1 rep)
Sep 23, 2022, 08:03 AM • Last activity: Oct 5, 2022, 07:58 AM
0 votes
0 answers
676 views
MacOS - curl: (60) SSL certificate problem: unable to get local issuer certificate
On Mac(Catalina) I'm trying to re-install `m4` package using terminal, However it fails with below errors. ``` $ brew reinstall m4 ==> Downloading https://ghcr.io/v2/homebrew/core/m4/manifests/1.4.19 Already downloaded: /Users/buildsystem/Library/Caches/Homebrew/downloads/5b2a7f715487b7377e409e8ca58...
On Mac(Catalina) I'm trying to re-install m4 package using terminal, However it fails with below errors.
$ brew reinstall m4
==> Downloading https://ghcr.io/v2/homebrew/core/m4/manifests/1.4.19 
Already downloaded: /Users/buildsystem/Library/Caches/Homebrew/downloads/5b2a7f715487b7377e409e8ca58569040cd89f33859f691210c58d94410fd33b--m4-1.4.19.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/m4/blobs/sha256:e0fec6a49fd80cc7279c71f319d70d01ed49e894b53cd91e39f170288232fa93 
-#O#- #   #
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html 

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
Error: Failed to download resource "m4"
Download failed: https://ghcr.io/v2/homebrew/core/m4/blobs/sha256:e0fec6a49fd80cc7279c71f319d70d01ed49e894b53cd91e39f170288232fa93 
Even after echo insecure >> $HOME/.curlrc also resulting same errors. Please let me know to solve this issue. Thanks in advance!
user4948798 (145 rep)
Mar 7, 2022, 10:50 AM • Last activity: Sep 22, 2022, 04:24 PM
1 votes
1 answers
2398 views
Brew installation fails due to Ruby versioning?
I am trying to install [Linux Brew](https://brew.sh) on [Garuda Linux](https://garudalinux.org) (Arch Linux based distro) but the install script fails with the following error: ==> Pouring portable-ruby-2.6.8.x86_64_linux.bottle.tar.gz Error: Failed to install ruby 2.6.8! Error: Failed to install Ho...
I am trying to install [Linux Brew](https://brew.sh) on [Garuda Linux](https://garudalinux.org) (Arch Linux based distro) but the install script fails with the following error: ==> Pouring portable-ruby-2.6.8.x86_64_linux.bottle.tar.gz Error: Failed to install ruby 2.6.8! Error: Failed to install Homebrew Portable Ruby and cannot find another Ruby 2.6.8! If there's no Homebrew Portable Ruby available for your processor: - install Ruby 2.6.8 with your system package manager (or rbenv/ruby-build) - make it first in your PATH - try again Failed during: /home/linuxbrew/.linuxbrew/bin/brew update --force --quiet I verified that Ruby exists on the system: ➜ ruby --version ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-linux] Is it complaining that Brew wants a particular version? I found [one](https://arstechnica.com/civis/viewtopic.php?f=16&t=1482948) or [two](https://www.reddit.com/r/ManjaroLinux/comments/t9zs67/homebrew_help_on_new_manjaro_install/) other users who posted the same error in recent days. The latter is also an Arch-based system and got the suggestion to install pkgconf, which I verified is installed on my system. ➜ pkgconf --version 1.8.0 I can't seem to figure out what the problem is ... any suggestions? I am new to Arch Linux based distributions.
ITA (123 rep)
Mar 11, 2022, 02:53 PM • Last activity: Mar 14, 2022, 03:24 PM
0 votes
1 answers
2475 views
Brew Install is same of yum?
I have a question about package management on OS. Brew is a package-management utility like Yum? Someone have any idea about it? Thanks
I have a question about package management on OS. Brew is a package-management utility like Yum? Someone have any idea about it? Thanks
Roytman Piccoli (113 rep)
Jan 28, 2022, 10:54 PM • Last activity: Jan 29, 2022, 09:37 AM
3 votes
1 answers
13842 views
How to install a FORTRAN compiler on macOS?
I am trying to install a Fortran compiler on my Mac Pro 2019 (running macOS). First step is: sudo apt-get install gfortran but I get error: `command not found` I also tried brew install gfortran also port install gfortran but again, the same error.
I am trying to install a Fortran compiler on my Mac Pro 2019 (running macOS). First step is: sudo apt-get install gfortran but I get error: command not found I also tried brew install gfortran also port install gfortran but again, the same error.
shere (149 rep)
Aug 18, 2019, 10:47 PM • Last activity: Sep 26, 2020, 11:07 AM
1 votes
1 answers
1284 views
Fedora: Command not found with sudo
I am aware of the --preserve-env or -E flag in `sudo`, however, it seems like this flag causes sudo to act weird in Fedora. I installed `ranger` with `LinuxBrew`, Here's what I get when I type in `which ranger` as a non-root user: ```bash $ which ranger /home/linuxbrew/.linuxbrew/bin/ranger ``` And...
I am aware of the --preserve-env or -E flag in sudo, however, it seems like this flag causes sudo to act weird in Fedora. I installed ranger with LinuxBrew, Here's what I get when I type in which ranger as a non-root user:
$ which ranger
/home/linuxbrew/.linuxbrew/bin/ranger
And if I sudo,
$ sudo -E which ranger
which: no ranger in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)

$ sudo -E echo $PATH
/usr/lib64/qt-3.3/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/david/bin:/home/david/.gem/ruby/2.6.0:/home/david/prog/flutter/bin:/home/david/go/bin:/home/linuxbrew/.linuxbrew/bin:/home/david/.local/bin:/snap/bin:/var/lib/snapd/snap/bin:/home/david/.gem/ruby/2.6.0:/home/david/go/bin:/home/linuxbrew/.linuxbrew/bin:/home/david/.local/bin:/snap/bin:/home/david/prog/flutter/bin

$ sudo -E ranger
sudo: ranger: command not found
But things get weirder:
sudo --preserve-env=PATH which ranger
/home/linuxbrew/.linuxbrew/bin/ranger

$ sudo --preserve-env=PATH ranger
sudo: ranger: command not found
Can anyone explain what the actual heck is going on here? Any help will be appreciated!
David (143 rep)
Mar 2, 2020, 12:54 AM • Last activity: Apr 9, 2020, 07:20 AM
1 votes
1 answers
1519 views
Problem Adding PATH to ~/.zshrc
I am having an issue adding a path variable on my zsh. This is the warning that was produced: ``` Warning: Homebrew's sbin was not found in your PATH but you have installed formulae that put executables in /usr/local/sbin. Consider setting the PATH for example like so: echo 'export PATH="/usr/local/...
I am having an issue adding a path variable on my zsh. This is the warning that was produced:
Warning: Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so:
  echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc
Kevin Kavai (21 rep)
Nov 1, 2019, 09:34 AM • Last activity: Apr 8, 2020, 10:06 PM
0 votes
1 answers
835 views
brew is not found when I sshpass to the server
brew is installed on the server but when I sshpass to the server, it throws `bash: brew: command not found` and same is happening for ideviceinstaller `bash: ideviceinstaller: command not found` This is the command I'm using ``` sshpass -p password ssh -oStrictHostKeyChecking=no -oCheckHostIP=no use...
brew is installed on the server but when I sshpass to the server, it throws bash: brew: command not found and same is happening for ideviceinstaller bash: ideviceinstaller: command not found This is the command I'm using
sshpass -p password ssh -oStrictHostKeyChecking=no -oCheckHostIP=no user@**** 'cd /Users/user/Documents/workspace/iOS; brew'
sshpass -p password ssh -oStrictHostKeyChecking=no -oCheckHostIP=no user@**** 'cd /Users/user/Documents/workspace/iOS; ideviceinstaller -l'
I have exactly same .bashrc and .bash_profile.
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

export ANDROID_HOME=/Users/user/Library/Android/sdk

export GIT_SSH_COMMAND='ssh -o KexAlgorithms=+diffie-hellman-group1-sha1'

export PATH=$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$PATH

# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
.profile
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
Not sure what mistake I'm making. Please help
Ram (1 rep)
Sep 23, 2019, 03:45 AM • Last activity: Sep 23, 2019, 05:55 AM
1 votes
3 answers
252 views
Best way to manage packages?
I'm trying to get familiar with Linux. One thing I struggle currently is managing packages. Native Linux package managers need tiresome work if I want latest versions. (Find and Add PPA or repository, Update, ...) I tried Linuxbrew, but it's **error prone** unlike Homebrew on macOS. How do you manag...
I'm trying to get familiar with Linux. One thing I struggle currently is managing packages. Native Linux package managers need tiresome work if I want latest versions. (Find and Add PPA or repository, Update, ...) I tried Linuxbrew, but it's **error prone** unlike Homebrew on macOS. How do you manage your packages especially if you want **up-to-date**? I'm running Kubuntu and openSUSE Tumbleweed for moving from macOS to Linux. Are PPA things fine with you? Or Linuxbrew works fine with you? Or ... How do you guys manage packages on Linux? There's no better option for that? Or ... Any opinion, advice, suggestion, your experience, ... are welcome!
luceat-lux-vestra (113 rep)
Jul 6, 2017, 05:11 AM • Last activity: Jun 13, 2019, 12:09 PM
0 votes
1 answers
65 views
write mistake bash_profile
I am using GCE, I want to install Scala on Google Cloud Shell, so I first install the brew, however when I added the brew path to bash_profile, I did a mistake. First of All, I downloaded the brew. Then I wanted to add bew path so I created a bash_profile under the root using vi ~/.bash_profile Then...
I am using GCE, I want to install Scala on Google Cloud Shell, so I first install the brew, however when I added the brew path to bash_profile, I did a mistake. First of All, I downloaded the brew. Then I wanted to add bew path so I created a bash_profile under the root using vi ~/.bash_profile Then I wrote the following lines in that file:
export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"
source ~/.bash_profile
Now, I know I need to type **"source ~/.bash_profile"** in prompt not in the bash_profile. But at that time I didn't notice that, and I saved the file, after that, I can no longer open the google cloud shell, it always shows the following infor: Image It said that **Cloud Shell session closed before the initial prompt displayed**, I can only access could shell in safe mode, cannot access the normal could shell using the button enter image description here, does anyone have ideas about how to solve this problem?
arron (1 rep)
May 29, 2019, 12:45 AM • Last activity: Jun 1, 2019, 12:02 AM
1 votes
1 answers
1155 views
OS X security blocking brew installation of python
Running Darwin Home 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64 Trying to finish updating python... but failing to link it cause of the security on this platform. You can use `brew link python` to link this version. Home:~ localadmin...
Running Darwin Home 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64 Trying to finish updating python... but failing to link it cause of the security on this platform. You can use brew link python to link this version. Home:~ localadmin$ brew link python Linking /usr/local/Cellar/python/3.7.3... Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks Home:~ localadmin$ sudo brew link python Password: Error: Running Homebrew as root is extremely dangerous and no longer supported. As Homebrew does not drop privileges on installation you would be giving all build scripts full access to your system. How do I get around this? Can I ask brew to tell me what it is trying to do here perhaps?
user3069232 (125 rep)
May 11, 2019, 08:34 AM • Last activity: May 11, 2019, 01:29 PM
1 votes
1 answers
46 views
Why is fzf failing in this case
I've found [`fzf`][1] to be a very useful utility, but for some reason it is failing me in this one particular instance. $ brew outdated | fzf -m --tac | brew upgrade Instead of letting me choose which items to upgrade, it displays a menu for a moment, and then proceeds to upgrade *everything*. I've...
I've found fzf to be a very useful utility, but for some reason it is failing me in this one particular instance. $ brew outdated | fzf -m --tac | brew upgrade Instead of letting me choose which items to upgrade, it displays a menu for a moment, and then proceeds to upgrade *everything*. I've never had it behave this way before. What am I overlooking?
iconoclast (9402 rep)
Jan 17, 2018, 09:42 PM • Last activity: Aug 31, 2018, 01:53 PM
2 votes
1 answers
864 views
Brew Formula: How can I define cask and external dependencies?
I’m writing a [brew formula][1] for my own tap, having XQuartz and external sources (not available on brew) as dependencies. How can I include them in my formula? [1]: https://github.com/kenokenobingo/homebrew-memetap
I’m writing a brew formula for my own tap, having XQuartz and external sources (not available on brew) as dependencies. How can I include them in my formula?
oioioi (33 rep)
Jun 11, 2018, 03:13 PM • Last activity: Aug 1, 2018, 09:33 AM
4 votes
0 answers
854 views
Faketime lib on Mac not always works
Installed libfaketime with brew, latest version 0.9.7, then did following steps as described in README.OSX: export DYLD_FORCE_FLAT_NAMESPACE=1 export DYLD_INSERT_LIBRARIES=/usr/local/Cellar/libfaketime/0.9.7_1/lib/faketime/libfaketime.1.dylib export FAKETIME="2000-01-01 01:01:01" /Applications/Appna...
Installed libfaketime with brew, latest version 0.9.7, then did following steps as described in README.OSX: export DYLD_FORCE_FLAT_NAMESPACE=1 export DYLD_INSERT_LIBRARIES=/usr/local/Cellar/libfaketime/0.9.7_1/lib/faketime/libfaketime.1.dylib export FAKETIME="2000-01-01 01:01:01" /Applications/Appname.app/Contents/MacOS/Appname Sometimes it's uses Faketime, but mostly it uses my system's actual date. How can i dig in to this issue?
Alexander Kim (141 rep)
Jul 27, 2018, 11:16 AM • Last activity: Jul 27, 2018, 11:18 AM
0 votes
1 answers
64 views
OSX brew failing to update.
I've searched the related questions and the solutions here this site and they have not helped me remedy the situation. I've had brew installed awhile now (since 2013) and had previously been updating without incident. I'm running El Capitan 10.11.6 `$ brew --version` `Homebrew 0.9.5 (no git reposito...
I've searched the related questions and the solutions here this site and they have not helped me remedy the situation. I've had brew installed awhile now (since 2013) and had previously been updating without incident. I'm running El Capitan 10.11.6 $ brew --version `Homebrew 0.9.5 (no git repository) ` Here's what's happening: $ brew update results in the following error output `xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun Error: Failure while executing: git status --untracked-files=all --porcelain 2>/dev/null`
Jesse Clark (1 rep)
Dec 13, 2017, 06:37 PM • Last activity: Dec 13, 2017, 08:30 PM
Showing page 1 of 20 total questions