apt-cyg 安装失败,/usr/bin/tar:这看起来不像 tar 存档

apt-cyg 安装失败,/usr/bin/tar:这看起来不像 tar 存档

当我尝试运行 apt-cyg 来安装一些 Cygwin 包时,我得到以下信息:

$ apt-cyg install xterm
grep: /etc/setup/installed.db: No such file or directory
Installing xterm
xterm-327-1.tar.xz: OK
/usr/bin/tar: This does not look like a tar archive
/usr/bin/tar: Skipping to next header
/usr/bin/tar: 60 garbage bytes ignored at end of archive
/usr/bin/tar: Error exit delayed from previous errors
Unpacking...
/usr/bin/tar: This does not look like a tar archive
/usr/bin/tar: Skipping to next header
/usr/bin/tar: 60 garbage bytes ignored at end of archive
/usr/bin/tar: Error exit delayed from previous errors
/usr/bin/mv: cannot stat `/etc/setup/installed.db': No such file or directory
/usr/bin/mv: cannot stat `/tmp/awk.24556': No such file or directory
Package xterm requires the following packages, installing:
bash cygwin libICE6 libX11_6 libXaw7 libXft2 libXinerama1 libXmu6 libXpm4 libXt6 libfontconfig1 libncursesw10 luit xorg-x11-fonts-dpi75 xorg-x11-fonts-misc
grep: /etc/setup/installed.db: No such file or directory
grep: /etc/setup/installed.db: No such file or directory
Installing bash
bash-4.4.12-3.tar.xz: OK
/usr/bin/tar: This does not look like a tar archive
/usr/bin/tar: Skipping to next header
/usr/bin/tar: 340 garbage bytes ignored at end of archive
/usr/bin/tar: Error exit delayed from previous errors
Unpacking...
/usr/bin/tar: This does not look like a tar archive
/usr/bin/tar: Skipping to next header
/usr/bin/tar: 340 garbage bytes ignored at end of archive
/usr/bin/tar: Error exit delayed from previous errors
/usr/bin/mv: cannot stat `/etc/setup/installed.db': No such file or directory
/usr/bin/mv: cannot stat `/tmp/awk.7756': No such file or directory
Package bash requires the following packages, installing:
coreutils cygwin libiconv2 libintl8 libreadline7
grep: /etc/setup/installed.db: No such file or directory
grep: /etc/setup/installed.db: No such file or directory

它以循环方式执行此操作,不断返回到原始包,然后迭代其依赖项。

我在 Windows 10 上使用 Cygwin。我尝试过:

  • 重新安装 Cygwin 和 apt-cyg(希望这个问题的根源是某种错误的 tar 安装或错误的设置文件,重新安装后会恢复为默认值)

  • 在以管理员身份运行的 cmd shell 中运行 Cygwin

  • 修改我的 PATH 变量,使 /cygwin/bin 按层次结构位于顶部

  • 耐心等待太阳最终膨胀并吞噬地球

如有任何建议能够帮助我前进,我将不胜感激。

答案1

您的cygwin安装已损坏或您认为如此,因为缺少apt-cyg已安装包的数据库 。/etc/setup/installed.db

Package xterm requires the following packages, installing:
bash cygwin libICE6 libX11_6 libXaw7 libXft2 libXinerama1 libXmu6 libXpm4 libXt6 libfontconfig1 libncursesw10 luit xorg-x11-fonts-dpi75 xorg-x11-fonts-misc
grep: /etc/setup/installed.db: No such file or directory

apt-cyg无法安装,bash cygwin因为它们是apt-cyg正常工作的先决条件。
使用安装程序并重新安装所需的包。

相关内容