0

はじめに、私の愚かな間違いをお詫び申し上げます。私は OneMonthRails を使い始めたばかりで、これは私にとってまったく新しいことです。私の問題は、Homebrew と git にあります。私の問題は環境変数に関係していると言われ、これが正しいと確信するのに十分な調査を行いました。詳細は次のとおりです。

Homebrew をインストールしようとしましたが、Xcode が存在しないという障害に遭遇しました。OSX 10.6.8 を実行していたため、最新の Xcode をインストールするには、少なくとも 10.7.x にアップグレードする必要がありました。OSX 10.8.4 にアップグレードして Xcode をインストールし、次の行を再実行しました

$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

次のスクリプトを取得します。

==> Installation successful!
You should run `brew doctor' *before* you install anything.
Now type: brew help

Paperclip gem を実行するために ImageMagick をインストールできるように Homebrew をインストールしています。

$ brew doctor

ラインを生成します

Warning: Experimental support for using Xcode without the "Command Line Tools".
You have only installed Xcode. If stuff is not building, try installing the
"Command Line Tools" package provided by Apple.
Warning: Broken symlinks were found. Remove them with `brew prune`:

///壊れたシンボリックリンクの長いリスト///

Warning: An outdated version of Git was detected in your PATH.
Git 1.7.10 or newer is required to perform checkouts over HTTPS from GitHub.
Please upgrade: brew upgrade git

自分の git バージョンを知りたいので、次のスクリプトを実行します。

$ git --version

これにより、次の行が生成されます。

git version 1.7.9.6

私のgitがどこにあるかを特定します:

$ which git

そしてそれは以下をもたらします:

/opt/sm/pkg/active/bin/git

さらに調査した結果、次のスクリプトを使用して git をアップグレードできることがわかりました。

$ brew install git

結果のスクリプトの最後の行は警告です。

Warning: This keg was marked linked already, continuing anyway
==> Summary
  /usr/local/Cellar/git/1.8.3.2: 1325 files, 28M, built in 45 seconds

git のアップグレードを確認します

$ git --version

git version 1.7.9.6

sudo think...インストールではなくアップグレードを実行する必要があるかもしれません。

///コンピューターを再起動///

$ brew upgrade git
Error: git-1.8.3.2 already installed

うーん...もう一度医者に相談してください

$ brew doctor

Warning: Experimental support for using Xcode without the "Command Line Tools".
You have only installed Xcode. If stuff is not building, try installing the
"Command Line Tools" package provided by Apple.

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 what additional flags to use when
compiling and linking.

$ git --version
git version 1.8.3.2

わーい!私は正しいことをしました!ImageMagick のインストールに進むことができるように、Homebrew を終了します。

$ brew doctor

Warning: Experimental support for using Xcode without the "Command Line Tools".
You have only installed Xcode. If stuff is not building, try installing the
"Command Line Tools" package provided by Apple.

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 what additional flags to use when
compiling and linking.

Arrg... Xcode をインストールしました。コマンド ライン ツールをインストールするにはどうすればよいですか? そして、この構成警告は何ですか? StackOverflow で確認したところ、ここに誘導されました: (.../questions/15225312/brew-doctor-gives-out-warnings)

私は自分が何をしているのか正確にはわからないので、以下はちょっとばかげています

$ $PATH

いいえ

$ echo $PATH

なし...

$ export PATH=/sm/pkg/active/bin/

なし

$ export PATH= /sm/pkg/active/bin/
-bash: export: `/sm/pkg/active/bin/': not a valid identifier

( = の後のスペースに注意してください)

どれだけ自分が何をしているか分からないことに気づき、助けを求める

$ brew help
-bash: brew: No such file or directory

ええとああ...

$ brew doctor
-bash: brew: No such file or directory

みんな、コンピューターを壊したと思う。私は何をすべきか???ImageMagick イメージ プロセッサをインストールし、Rails で Paperclip gem を使用できるようにするには、Homebrew を機能させる必要があります。

:(((

4

2 に答える 2

3

私はそれが非常にイライラしていることを知っています. そこに行って、それをしました。

ここではいくつかのことが行われているので、一度に 1 つずつ取り上げてください (実際、私はいくつかのことを推測しているだけなので、この回答を更新して喜んでお知らせします)。

始めましょう:

Warning: Experimental support for using Xcode without the "Command Line Tools". You have only installed Xcode. If stuff is not building, try installing the "Command Line Tools" package provided by Apple.

コマンド ライン ツールをインストールすることを強くお勧めします。homebrew がダウンロードするコードのコンパイルに役立つ gcc やその他のツールをインストールします。

  1. Xcode を開きます。
  2. 環境設定を開きます。
  3. 上部のバーで、「ダウンロード」を選択します
  4. 「コマンドラインツール」をインストール

第二に、あなたがどのようにしてあなたの道を完全に吹き飛ばしたのか、私にはわかりません。最初に、この端末を台無しにしたかどうか、および PATH が問題ない場合は端末を閉じて新しい端末ウィンドウを起動したかどうかを確認します。

ただし、それが失敗した場合は、次のパスにいくつかの基本的な検索パスが含まれており、道を進むのに役立ちます。

export PATH=/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:/usr/local/sbin

おそらく、.zshrc/.zsh_profile または .bashrc/.bash_profile をチェックして、PATH の設定先を確認する必要があります。

=そのコマンドを入力しているときに、両側にスペースが必要になることはありません。

于 2013-08-09T22:54:03.600 に答える
-1

最近、10.6 から 10.8 へのアップグレード (レール、バンドラー、RVM をインストールするため) を試みましたが、brew と RVM が競合し、独自の問題 (PATH、パーミッション/書き込み不可フォルダー、古いバージョンの XCode など) で同じ問題がたくさんありました。 )。すべて (TMachine、git、および選択したディレクトリ ツリーを手動でコピー) を 3 倍にバックアップし、USB ドライブから Mountain Lion をクリーン インストールした後、問題なく動作しました。

PATH の問題のみが発生している場合は、手動/一時的に編集できます (次回 .bashrc が実行されるまで、回答へのコメントによると: Brew doctor Gives out warnings )

于 2013-08-09T23:35:50.840 に答える