2013-06-05 50 views
0

我是Ruby新手,並且正在使用終端。我安裝了rvm,但我似乎無法安裝Ruby 1.9.3。這個問題似乎與rsync和端口樹同步。我不知道這是什麼意思。安裝RVM:同步本地端口樹失敗rsync

我試過尋找其他的解決方案,但沒有一個與rvm相關(我可以理解,他們都只關注autoupdated macports自身)。我也看到了有關proxys的一些事情,但是如果那是真的,我不知道我需要做什麼。他們都主要關注macports,並使用諸如「sudo」或-d這樣的詞語進行環繞,當我試圖安裝Ruby時,我不知道該如何做。以下是我得到:

$ rvm install 1.9.3 
Searching for binary rubies, this might take some time. 
No binary rubies available for: osx/10.7/x86_64/ruby-1.9.3-p429. 
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies. 
Installing requirements for osx, might require sudo password. 
Installing macports............................................................................................................................................................................................................................................................................................................................Password: 
............................................................................................................................................................................................................................................. 
DEBUG: Copying /Users/Elvis/Library/Preferences/com.apple.dt.Xcode.plist to /opt/local/var/macports/home/Library/Preferences 
DEBUG: MacPorts sources location: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs 
---> Updating MacPorts base sources using rsync 
receiving file list ... done 
base.tar 

sent 58 bytes received 955032 bytes 272882.86 bytes/sec 
total size is 3594240 speedup is 3.76 
receiving file list ... done 
base.tar.rmd160 

sent 58 bytes received 635 bytes 1386.00 bytes/sec 
total size is 512 speedup is 0.74 
DEBUG: successful verification with key /opt/local/share/macports/macports-pubkey.pem 
DEBUG: /usr/bin/tar -C /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/tmp -xf /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/base.tar 
MacPorts base version 2.1.3 installed, 
DEBUG: Rebuilding and reinstalling MacPorts if needed 
MacPorts base version 2.1.3 downloaded. 
---> Updating the ports tree 
Synchronizing local ports tree from rsync://rsync.macports.org/release/tarballs/ports.tar 
DEBUG: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/tarballs/ports.tar /opt/local/var/macports/sources/rsync.macports.org/release/tarballs 
receiving file list ... done 
ports.tar 
WARNING: ports.tar failed verification -- update discarded (will try again). 
rsync: read errors mapping "/tarballs/ports.tar" (in release): No data available (61) 
ports.tar 

sent 80 bytes received 11948570 bytes 682780.00 bytes/sec 
total size is 53186560 speedup is 4.45 
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(1400) [generator=2.6.9] 
Command failed: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/tarballs/ports.tar /opt/local/var/macports/sources/rsync.macports.org/release/tarballs 
Exit code: 23 
Error: Synchronization of the local ports tree failed doing rsync 
DEBUG: Couldn't sync the ports tree: Synchronization of 1 source(s) failed 
    while executing 
"macports::selfupdate [array get global_options] base_updated" 
Error: /Users/Elvis/.rvm/bin/port: port selfupdate failed: Couldn't sync the ports tree: Synchronization of 1 source(s) failed 
Elviss-MacBook-Pro:~ Elvis$ ./port -d selfupdate 
-bash: ./port: No such file or directory 

我試着使用一些關鍵字/答案我在最後,這也解釋了./port線下線上看到的。我從xcode安裝了命令行。安裝自制軟件可以解決這個問題嗎?我會很感激任何幫助!

回答

-1

確保下面的命令正確

運行
port selfupdate 

,然後再次嘗試

+0

甜那肯定幫我到正確的方向@mpapis!非常感謝!對於將來出現此問題的其他人,此行對我有用: sudo port -d selfupdate – xulander

+0

「-d」標誌是做什麼的?如果沒有它,它有什麼不同? – mpapis

+0

-d標誌用於更「詳細的輸出」。運行只是端口selfupdate給了我這個錯誤: 錯誤:/Users/Elvis/.rvm/bin/port:端口selfupdate失敗:錯誤同步MacPorts源:命令執行失敗 我認爲sudo可能剛剛完成了這項工作! – xulander