質問するログイン新規登録
Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

Q&A

1回答

1542閲覧

homebrewのインストールが上手く行きません。

kekokakiku

総合スコア0

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

0グッド

0クリップ

投稿2022/05/20 05:31

0

0

wgetを使いたいため、homebrewのインストールをしたいです。
macOSで、以下を入力しインストールを試みました。

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

しかし、結果は以下です。
==> Checking for sudo access (which may request your password)...
Password:
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew

Press RETURN/ENTER to continue or any other key to abort:
==> /usr/bin/sudo /usr/sbin/chown -R taku:admin /usr/local/Homebrew
==> Downloading and installing Homebrew...
Updating files: 100% (2780/2780), done.
HEAD is now at 54b45c2c8 Merge pull request #13304 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-rspec-2.11.1
error: Not a valid ref: refs/remotes/origin/master
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

全く同じ質問内容の投稿で、

git -C $(brew --repository homebrew/core) checkout master

以上のコードを実行することで解決したようなのですが、これを実行したところ以下のようなエラーが起きてしまいます。
error: pathspec 'master' did not match any file(s) known to git

brew doctor

の実行内容は以下の通りです。
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
softwareupdate --all --install --force

If that doesn't show you any updates, run:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install

Alternatively, manually download them from:
https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 13.2.1.

Warning: Homebrew/homebrew-core was not tapped properly! Run:
rm -rf "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core"
brew tap homebrew/core

Warning: "config" scripts exist outside your system or Homebrew directories.
./configure scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9-config
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3-config
/opt/anaconda3/bin/icu-config
/opt/anaconda3/bin/krb5-config
/opt/anaconda3/bin/freetype-config
/opt/anaconda3/bin/xslt-config
/opt/anaconda3/bin/libpng16-config
/opt/anaconda3/bin/python3.7-config
/opt/anaconda3/bin/libpng-config
/opt/anaconda3/bin/xml2-config
/opt/anaconda3/bin/python3.7m-config
/opt/anaconda3/bin/python3-config
/opt/anaconda3/bin/curl-config
/opt/anaconda3/bin/ncursesw6-config
/opt/anaconda3/bin/pcre-config

Warning: Some taps are not on the default git origin branch and may not receive
updates. If this is a surprise to you, check out the default branch with:
git -C $(brew --repo homebrew/core) checkout

初心者で申しございません。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

hoshi-takanori

2022/05/20 22:42

Homebrew インストール時に homebrew-core という git リポジトリをクローンする処理が行われますが、たまに失敗するようで、teratail でもよく質問されてます。 とりあえず brew doctor の指示通り rm -rf "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" brew tap homebrew/core すると良いかも。(怖いコマンドですが…。)
guest

回答1

0

しかし、結果は以下です。
==> Checking for sudo access (which may request your password)...
Password:

homebrewのインストールは一般ユーザアカウントで実施します。
途中でパスワードを入力する手順などありません。
基本的なインストール手順を理解していないのでしょう。

Installation
https://docs.brew.sh/Installation

投稿2022/05/20 12:16

technocore

総合スコア7398

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

hoshi-takanori

2022/05/20 22:37

Homebrew のインストール時には、/usr/local または /opt/homebrew にユーザー権限でディレクトリを作るために sudo mkdir のパスワード入力が必要になるはず。手順は間違ってないと思います。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.30%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問