Giter Club home page Giter Club logo

Comments (7)

Bo98 avatar Bo98 commented on July 17, 2024

Have a check of

install/install.sh

Lines 222 to 254 in 3d2b88b

have_sudo_access() {
if [[ ! -x "/usr/bin/sudo" ]]
then
return 1
fi
local -a SUDO=("/usr/bin/sudo")
if [[ -n "${SUDO_ASKPASS-}" ]]
then
SUDO+=("-A")
elif [[ -n "${NONINTERACTIVE-}" ]]
then
SUDO+=("-n")
fi
if [[ -z "${HAVE_SUDO_ACCESS-}" ]]
then
if [[ -n "${NONINTERACTIVE-}" ]]
then
"${SUDO[@]}" -l mkdir &>/dev/null
else
"${SUDO[@]}" -v && "${SUDO[@]}" -l mkdir &>/dev/null
fi
HAVE_SUDO_ACCESS="$?"
fi
if [[ -n "${HOMEBREW_ON_MACOS-}" ]] && [[ "${HAVE_SUDO_ACCESS}" -ne 0 ]]
then
abort "Need sudo access on macOS (e.g. the user ${USER} needs to be an Administrator)!"
fi
return "${HAVE_SUDO_ACCESS}"
}
and see if you can find what part is hanging for you.

Typical flow would be /usr/bin/sudo -v && /usr/bin/sudo -l mkdir

from install.

alfonsocv12 avatar alfonsocv12 commented on July 17, 2024

Okay I run that it asked my password and then get stuck here is my script

#!/bin/bash

have_sudo_access() {
  if [[ ! -x "/usr/bin/sudo" ]]
  then
    return 1
  fi

  local -a SUDO=("/usr/bin/sudo")
  if [[ -n "${SUDO_ASKPASS-}" ]]
  then
    SUDO+=("-A")
  elif [[ -n "${NONINTERACTIVE-}" ]]
  then
    SUDO+=("-n")
  fi

  if [[ -z "${HAVE_SUDO_ACCESS-}" ]]
  then
    if [[ -n "${NONINTERACTIVE-}" ]]
    then
      "${SUDO[@]}" -l mkdir &>/dev/null
    else
      "${SUDO[@]}" -v && "${SUDO[@]}" -l mkdir &>/dev/null
    fi
    HAVE_SUDO_ACCESS="$?"
  fi

  if [[ -n "${HOMEBREW_ON_MACOS-}" ]] && [[ "${HAVE_SUDO_ACCESS}" -ne 0 ]]
  then
    abort "Need sudo access on macOS (e.g. the user ${USER} needs to be an Administrator)!"
  fi

  return "${HAVE_SUDO_ACCESS}"
}


have_sudo=$(have_sudo_access)

echo "Response $have_sudo"
Screenshot 2023-12-14 at 4 47 57 PM

from install.

alfonsocv12 avatar alfonsocv12 commented on July 17, 2024

If I put the wrong password I get re-prompted

Screenshot 2023-12-14 at 5 06 26 PM

from install.

alfonsocv12 avatar alfonsocv12 commented on July 17, 2024

I found the problem is the -l in line 243 of the installer

Stuck

"${SUDO[@]}" -v && "${SUDO[@]}" -l mkdir &>/dev/null

No Stuck

"${SUDO[@]}" -v && "${SUDO[@]}" mkdir &>/dev/null

from install.

alfonsocv12 avatar alfonsocv12 commented on July 17, 2024

I downloaded the installation script fix the -l and try again still getting stuck

from install.

MikeMcQuaid avatar MikeMcQuaid commented on July 17, 2024

If you need more help: please open a discussion.

from install.

osalbahr avatar osalbahr commented on July 17, 2024

I just have Debian Trixie system (Testing branch of Debian 12)

FWIW, the prompt works fine in a docker run -it debian:testing container. It might help to see if the issue happens on a proper fresh install rather than a container.

osalbahr@ad93086274c7:~$ brew dr
Your system is ready to brew.
osalbahr@ad93086274c7:~$ brew config
HOMEBREW_VERSION: 4.1.25
ORIGIN: https://github.com/Homebrew/brew
HEAD: c32bd1c7cc0c3b1b914845bddfeda53f4d877a3f
Last commit: 8 days ago
Core tap JSON: 15 Dec 09:56 UTC
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 4
Homebrew Ruby: 3.1.4 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: quad-core 64-bit skylake
Clang: N/A
Git: 2.43.0 => /bin/git
Curl: 8.4.0 => /bin/curl
Kernel: Linux 6.5.11-linuxkit x86_64 GNU/Linux
OS: Debian GNU/Linux trixie/sid
Host glibc: 2.37
/usr/bin/gcc: 13.2.0
/usr/bin/ruby: N/A
glibc: N/A
gcc@11: N/A
gcc: N/A
xorg: N/A

from install.

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.