2013-07-15 22 views
0

首先,我很抱歉我的任何愚蠢的錯誤。我剛剛開始使用OneMonthRails,這對我來說都是非常新的。我的問題是與家釀和混帳。我被告知我的問題與環境變量有關,並且我已經做了足夠的研究來確信這是正確的。好吧,這裏的細節:不能得到自制和混帳工作,我希望他們的方式

我試圖安裝自制軟件,但遇到了Xcode正在缺席的障礙。運行OSX 10.6.8,並且必須升級到至少10.7.x才能安裝最新的Xcode。我升級到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 

我安裝自制軟件,這樣我可以以運行安裝的ImageMagick回形針寶石,所以我接受我的終端有關運行$ brew醫生的建議。

$ 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 

須藤想...也許我需要運行升級,而不是安裝。

///重新啓動計算機///

$ 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:

$ 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-giving-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。

:((

+2

堆棧溢出提示:您可以按編碼格式而不是粗體 – mnagel

+0

好的,一些控制問題,WTF是'/ opt/sm/pkg'和'/ sm/pkg /'? –

+0

快速修復 - 您覆蓋了PATH,重新啓動終端以修復它。 –

回答

3

我知道它的超級令人沮喪的,有些什麼困惑讓這一切工作去過那裏,這樣做

有在這裏打球有兩件事情,所以把他們一個。在同一時間(其實我只是猜測一些東西,所以我很高興來更新這個答案,因爲你讓我知道更多)

讓我們先從:

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.

強烈建議安裝命令行工具。它將安裝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。

當您輸入該命令時,您不會希望=兩側的空間。

0

我最近嘗試過從10.6升級到10.8(安裝rails,bundler,RVM),並且在brew和RVM衝突以及有自己單獨的問題(路徑,權限/非可寫文件夾,舊版本XCode等)。在三倍備份(TMachine,git和手動複製選定的目錄樹)後,它沒有出現問題,並且乾淨的Mountain Lion安裝在USB驅動器上。

如果你只爲PATH的問題,您可以編輯手動/暫時(直到下一次的.bashrc運行時,每答案評論:Brew doctor gives out warnings

相關問題