Python 错误 OSError: [Errno 31] 链接太多

编程入门 行业动态 更新时间:2024-10-24 09:21:03
本文介绍了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:关键词]

本文发布于:2023-04-29 08:19:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1186728.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:太多   错误   链接   Python   OSError

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!