我在 windows 7 上安装了 cygwin。
我还需要安装一些包,当我尝试使用命令时-
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-" = "--"
我很乐意提供一些帮助。
谢谢。
最佳答案
您显示的错误似乎与 Windows 风格的换行符搞乱了 cygwin
有关。
如果您有 dos2unix
可用,请尝试在 apt-cyg
所在的位置运行 dos2unix apt-cyg
。
如果你没有dos2unix
,看看this question从哪里安装它。
另外,看看 this related question .
使用说明:
- 仅 对文件
apt-cyg
运行dos2unix
。即,运行命令dos2unix apt-cyg
。目的是“修复”文件apt-cyg
,以便它能够正常工作,而现在它正在失败。 - 按照您在问题中所做的方式运行
apt-cyg
。 不要在命令前加上dos2unix
。
关于windows-7 - cygwin apt-get : command not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22803178/