Coder Social home page Coder Social logo

Comments (11)

tomice avatar tomice commented on August 27, 2024 2

I'm double-checking the Homebrew documentation from here: https://docs.brew.sh/Installation

It appears the path will be different depending on if you're on an Intel machine (like mine) or on an ARM machine:

"The script installs Homebrew to its default, supported, best prefix (/opt/homebrew for Apple Silicon, /usr/local for macOS Intel and /home/linuxbrew/.linuxbrew for Linux) so that you don’t need sudo after Homebrew’s initial installation when you brew install"

And further discussion on when it happened: https://github.com/orgs/Homebrew/discussions/664

The exact location will depend on where you installed it to and at what point in Homebrew's life you had happened to install it (previously, it appears it would install into /usr/local/bin), so I guess I should adjust the check I'm asking people to run. The above version should work for anybody on Intel with the most recent version of Homebrew as of May 2024 who used the default install paths for everything.

For everyone else, you'll need to find out where your gnubin folder is and add it to your path like I showed above. The coreutils brew package itself, I believe, says you can maybe do this:

export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH"

The goal is to find where the coreutils are installed and add that gnubin folder to your PATH

from git-quick-stats.

tomice avatar tomice commented on August 27, 2024 2

@soundstep and @zekida , can you also confirm the above example works? If so, I'll go ahead and update our documentation to make it more clear what users on macOS will need to do to get this to work for them.

from git-quick-stats.

agoalofalife avatar agoalofalife commented on August 27, 2024 1

export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH"

Yes it works - thank a lot
My path was (for example) export PATH="/opt/homebrew/Cellar/coreutils/9.5/libexec/gnubin/:$PATH"

from git-quick-stats.

zekida avatar zekida commented on August 27, 2024 1

export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH"

i can confirm it works on apple silicon. thanks for the quick fix :)

from git-quick-stats.

soundstep avatar soundstep commented on August 27, 2024 1

Thanks @tomice for looking into that.
It is working with:

export PATH="$PATH:/opt/homebrew/Cellar/coreutils/9.5/libexec/gnubin/"

And:

alias date="gdate"

gdate is the GNU version, testable with date --version which doesn't work with the other one

Probably worth adding to a doc?
Cheers!

from git-quick-stats.

agoalofalife avatar agoalofalife commented on August 27, 2024

Yes, I have the same problem in OS Ventura

from git-quick-stats.

tomice avatar tomice commented on August 27, 2024

What happens if you do you following:

  1. export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
  2. git quick-stats (or whatever your preferred way of launching is)

Using my 2015 MacBook Pro with macOS 14.4.1, and this appears to work on my end.

from git-quick-stats.

zekida avatar zekida commented on August 27, 2024

What happens if you do you following:

  1. export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
  2. git quick-stats (or whatever your preferred way of launching is)

Using my 2015 MacBook Pro with macOS 14.4.1, and this appears to work on my end.

though the path wasn't included in my env PATH,
adding it still doesn't work for me (2023 M2 MBP macOS 14.4.1)

~/repo main
❯ export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"

~/repo main
❯ date --version
date (GNU coreutils) 9.5
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.

~/repo main
❯ git quick-stats
ERROR: You must have GNU date installed.
If you're on macOS, please use brew to install this utility.
Make sure the GNU version of date is symlinked to 'date', too.

from git-quick-stats.

soundstep avatar soundstep commented on August 27, 2024

Is that a Linux path? there is not path from /usr/local/opt, opt does not exist.

from git-quick-stats.

esthor avatar esthor commented on August 27, 2024

None of the workarounds here seem to work for me. Apple Silicon Mac 14.6.1. Any tips?

from git-quick-stats.

tomice avatar tomice commented on August 27, 2024

None of the workarounds here seem to work for me. Apple Silicon Mac 14.6.1. Any tips?

Hi there! I just upgraded my M1 Air to 14.6.1, and things appear to be working as expected. Couple questions:

  • What is the output of date --version? <- If this says illegal option, it means that your shell is unable to find the date utility that resides in gnubin
  • What is the output of echo $PATH <- You want to make sure the location of the gnubin dir is in here
  • What is the output of command -v gdate <- If this comes back empty, it means your shell isn't able to find the location of gdate which is necessary to use this script. In which case, you may not have installed the coreutils package

You can run find /opt /usr -type d -name gnubin to find the location of where gnubin resides on your computer. If it doesn't exist, you'll need to install it via brew install coreutils. You'll need to add that to your path by typing something like PATH=/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH

Thanks!

from git-quick-stats.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.