Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我刚刚在我的 Windows 10 计算机上安装了 MSys2(https ://msys2.github.io、msys2-x86_64-20150916.exe)。
安装后,终端将启动。但是一旦我停止并重新启动它,我就会收到错误消息:“无法运行 /sbin/nologin:没有这样的文件或目录”。
知道该怎么做吗?
你应该弄清楚为什么 Bash 试图运行/sbin/nologin. 检查您的 Windows 主目录(例如C:\Users\Joe)中是否有.bash_profile、.profile和.bashrc. 检查这些文件并找到哪个文件正在调用 nologin。
/sbin/nologin
C:\Users\Joe
.bash_profile
.profile
.bashrc
如果这没有帮助,请尝试在C:/msys64/sbin/nologin或实际安装 MSYS2 的任何位置创建一个空文件。一个空文件将是一个有效的 shell 脚本并且运行没有错误。
C:/msys64/sbin/nologin
如果错误不是致命的,您可能会考虑忽略它。