windows-7 - cygwin apt-get : command not found

标签 windows-7 cygwin apt-get x11

我在 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 .

使用说明:

  1. 对文件apt-cyg 运行dos2unix。即,运行命令 dos2unix apt-cyg。目的是“修复”文件 apt-cyg,以便它能够正常工作,而现在它正在失败。
  2. 按照您在问题中所做的方式运行 apt-cyg不要在命令前加上dos2unix

关于windows-7 - cygwin apt-get : command not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22803178/

相关文章:

linux - 查找和删除重复文件 (md5sum)

linux - "-y"标志有什么作用?

ubuntu - debconf 警告尽管 DEBIAN_FRONTEND 在 Docker 镜像中

c# - 更改打印机默认纸张尺寸

python - 当安装管理器未安装Python时,如何在Windows上安装MySQL Connector for Python?

vim - 删除除一行的第一个实例之外的所有内容

windows-7 - VS2012、Windows 8、DirectX 及其 SDK

bash - Vim:当 "[1]"存在时编辑 "1"的便携方式

c# - 从 shell 运行的 ffmpeg 运行正常,但在 .NET 中调用时运行不正常

php - sudo apt-get install php-redis 停止工作