2014-04-02 158 views
1

我安裝了Cygwin OM Windows 7的cygwin的apt-get的:命令未找到

我還需要安裝一些軟件包,當我嘗試使用命令 -

apt-get install gstreamer-dbus-media-service gstreamer-tools gstreamer0.10-alsa gstreamer0.10-buzztard gstreamer0.10-buzztard-doc gstreamer0.10-crystalhd gstreamer0.10-doc gstreamer0.10-ffmpeg gstreamer0.10-ffmpeg-dbg gstreamer0.10-fluendo-mp3 gstreamer0.10-gconf gstreamer0.10-gnomevfs gstreamer0.10-gnonlin gstreamer0.10-gnonlin-dbg gstreamer0.10-gnonlin-doc gstreamer0.10-hplugins gstreamer0.10-nice gstreamer0.10-packagekit gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-doc gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-base gstreamer0.10-plugins-base-apps gstreamer0.10-plugins-base-dbg gstreamer0.10-plugins-base-doc gstreamer0.10-plugins-cutter gstreamer0.10-plugins-good gstreamer0.10-plugins-good-doc gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-doc gstreamer0.10-pocketsphinx gstreamer0.10-pulseaudio gstreamer0.10-qapt gstreamer0.10-sdl gstreamer0.10-tools gstreamer0.10-vaapi gstreamer0.10-vaapi-doc gstreamer0.10-x 

我得到這個錯誤:

bash: apt-get: command not found 

我看到了類似的問題和解決方案,爲例 - 這個鏈接

https://code.google.com/p/apt-cyg/

,但它不工作

編輯: 我跟着命令,這是錯誤我得到:

$ apt-cyg install nano 
/usr/bin/apt-cyg: line 19: $'\r': command not found 
/usr/bin/apt-cyg: line 27: syntax error near unexpected token `||' 
'usr/bin/apt-cyg: line 27: ` || test "-$GAWK-" = "--" || test "-$XZ-" = "--" 

我會很樂意爲一些幫助。

謝謝。

+1

由於這個答案(http://stackoverflow.com/questions/9751845/apt-get-for-cygwin)指向你已經鏈接的鏈接,並且你聲稱它不起作用,所以我們可以幫助你你如果解釋了它爲什麼不起作用。 – merlin2011

+0

我編輯了我的問題。謝謝。 我提供的鏈接來自35個「喜歡」的答案 – user3378689

+0

@ user3378689「喜歡」被稱爲* upvotes *,而它們的反義詞* downvotes *。 。 –

回答

2

您顯示的錯誤似乎與Windows風格的換行符搞砸了cygwin

如果您有dos2unix可用,請嘗試在apt-cyg的任何位置運行dos2unix apt-cyg

如果您還沒有dos2unix,請查看this question以瞭解安裝位置。

另外,看看this related question

澄清用法:上檔apt-cyg只有

  1. 運行dos2unix。也就是說,運行命令dos2unix apt-cyg。目的是爲了「修復」文件apt-cyg,以便它能夠正常工作,現在正在失敗。
  2. 運行apt-cyg就像你在你的問題中一樣。 不要dos2unix之前加上命令。
+0

確定我試過DOS2UNIX的,當我試圖 「DOS2UNIX的的apt-CYG安裝納米」 我得到這個:DOS2UNIX的:文件的apt-CYG轉換爲Unix格式... DOS2UNIX的:第1行 DOS2UNIX的發現二進制符號爲0x00 :跳過二進制文件安裝 dos2unix:二進制符號0x00找到第1行 dos2unix:跳過二進制文件納米 我不認爲這是好的.. – user3378689

+0

@ user3378689,請參閱已編輯的答案進行澄清,併爲最初的歧義性道歉。 – merlin2011