操作系统
Linux 错误码
Linux 错误码通常是 errno:系统调用返回的小整数,并映射为 EACCES、ENOENT 等符号名。程序一般会同时打印符号名、数字和说明;符号名才是稳定标识。
| 代码 | 含义 | 严重级别 | 来源 |
|---|---|---|---|
EPERM (1) |
Operation Not Permitted 即使拥有提升的权限,该操作也不被允许。 |
错误 | Linux man-pages: errno(3) |
ENOENT (2) |
No Such File or Directory 使用的路径上不存在该文件或目录。 |
错误 | Linux man-pages: errno(3) |
EIO (5) |
Input/Output Error 底层 I/O 操作失败。 |
致命 | Linux man-pages: errno(3) |
EACCES (13) |
Permission Denied 进程没有访问文件或目录的权限。 |
错误 | Linux man-pages: errno(3) |
ENOMEM (12) |
Cannot Allocate Memory 系统或进程无法分配所需内存。 |
错误 | Linux man-pages: errno(3) |
EBUSY (16) |
Device or Resource Busy 设备或资源仍在使用中,无法完成操作。 |
警告 | Linux man-pages: errno(3) |
EEXIST (17) |
File Exists 目标文件或目录已经存在。 |
警告 | Linux man-pages: errno(3) |
EINVAL (22) |
Invalid Argument 系统调用或库函数收到了无效参数。 |
警告 | Linux man-pages: errno(3) |
EMFILE (24) |
Too Many Open Files 进程达到了打开文件描述符的上限。 |
错误 | Linux man-pages: errno(3) |
ENOSPC (28) |
No Space Left on Device 文件系统或设备已经没有可用空间。 |
错误 | Linux man-pages: errno(3) |
EADDRINUSE (98) |
Address Already in Use 网络地址或端口已被占用。 |
错误 | Linux man-pages: errno(3) |
ECONNREFUSED (111) |
Connection Refused 远程主机主动拒绝了连接。 |
错误 | Linux man-pages: errno(3) |
ETIMEDOUT (110) |
Connection Timed Out 连接或操作超时。 |
错误 | Linux man-pages: errno(3) |
没有匹配的代码。
常见代码 Linux
如何阅读这些错误码
先确认代码出现的上下文,再用详情页的快速答案和官方来源核对含义。同一个值在不同产品、版本或组件中可能代表不同问题。修改配置、删除数据或重启设备前,请先确认影响范围。
发现错误或缺失?
请提供产品、代码和官方来源。每条纠错都会人工复核。