windows10 专业版 MSYS2 启动失败问题

本文介绍了解决MSYS2在Windows10环境下无法启动的问题。主要原因是null.sys驱动出现问题,解决方案是替换该文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

新装windows10 专业版( 21H1  19043.1288 )遇到 msys2 不能正常启动问题。现象是

 通过windows命令行到 c:/msys2/ 执行
"msys2_shell.cmd -defterm -here"

会提示以下信息:

output logs:

bash: /dev/null: No such device or address
bash: /dev/null: No such device or address
bash: /dev/null: No such device or address
bash: /dev/null: No such device or address
/usr/bin/pacman-key: line 535: /dev/null: No such device or address
/usr/share/makepkg/util/message.sh: line 28: /dev/null: No such device or address
/usr/bin/pacman-key: line 599: /dev/null: No such device or address
==> ERROR: Cannot find the gpg binary required for all pacman-key operations.
/usr/bin/pacman-key: line 535: /dev/null: No such device or address
/usr/share/makepkg/util/message.sh: line 28: /dev/null: No such device or address
/usr/bin/pacman-key: line 599: /dev/null: No such device or address
==> ERROR: Cannot find the gpg binary required for all pacman-key operations.
/usr/bin/pacman-key: line 535: /dev/null: No such device or address
/usr/share/makepkg/util/message.sh: line 28: /dev/null: No such device or address
/usr/bin/pacman-key: line 599: /dev/null: No such device or address
==> ERROR: Cannot find the gpg binary required for all pacman-key operations.
gpgconf: Fatal: failed to open '/dev/null': No such device or address
gpgconf: error running '/usr/bin/gpg-connect-agent': exit status 2
gpgconf: error running '/usr/bin/gpg-connect-agent KILLDIRMNGR': General error
gpgconf: Fatal: failed to open '/dev/null': No such device or address
gpgconf: error running '/usr/bin/gpg-connect-agent': exit status 2
gpgconf: error running '/usr/bin/gpg-connect-agent scd killscd': General error
gpgconf: Fatal: failed to open '/dev/null': No such device or address
gpgconf: error running '/usr/bin/gpg-connect-agent': exit status 2
gpgconf: error running '/usr/bin/gpg-connect-agent KILLAGENT': General error
... 

经确认是 windows 的 null 设备启动不正常。

问题可能是以下原因:

c:/window/system32/driver/null.sys  文件问题

笔者解决办法:从其他正常机器复制一个 null.sys 文件 覆盖本地文件(也可以先删旧文件,再复制过来)。

如果换null.sys文件后 sc start null命令执行能看到 图中所示 Running 的情况。

说明null设备启动正常,再去启动msys2.exe程序将正常运行。

参考 null.sys文件,需要使用的可以下载(自测能用,需要的可以下载后解压使用)

链接: https://pan.baidu.com/s/199xWgWTkS_ZPJIfkeiG_Xw
提取码:f8jz

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值