本文介绍了Python 错误 OSError: [Errno 31] 链接太多的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
限时送ChatGPT账号..请参阅下面的错误消息,我在尝试使用 Python 的本机 os 库创建新目录时收到此错误消息.
See error message below, I get this while trying to create a new directory with Python's native os library.
...
File "files.py", line 93, in create_dir
os.makedirs(d)
File "/usr/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 31] Too many links: '/var/lib/kaas/77520'
我可以看到这个目录中已经有超过 32000 个目录
I can see that there are just above 32000 directories already in this directory
$ ll | wc -l
32001
操作系统级别对可以创建的目录数量有限制吗,或者是什么导致了这里的问题?还是这是 Python 的限制?
Is there a limit on the OS level for how many directories that can be created or what is causing the issue here? Or is this a Python limitation?
我运行的是 Ubuntu 12.04.4 LTS.
I'm running Ubuntu 12.04.4 LTS.
推荐答案
32000 目录条目限制是文件系统级别的 ext3 限制.
The 32000 directory entry limit is a filesystem-level ext3 limit.
这篇关于Python 错误 OSError: [Errno 31] 链接太多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论