![错误:由于 OSError 导致无法安装软件包:[Errno 28] 设备上没有剩余空间](https://linux22.com/image/938721/%E9%94%99%E8%AF%AF%EF%BC%9A%E7%94%B1%E4%BA%8E%20OSError%20%E5%AF%BC%E8%87%B4%E6%97%A0%E6%B3%95%E5%AE%89%E8%A3%85%E8%BD%AF%E4%BB%B6%E5%8C%85%EF%BC%9A%5BErrno%2028%5D%20%E8%AE%BE%E5%A4%87%E4%B8%8A%E6%B2%A1%E6%9C%89%E5%89%A9%E4%BD%99%E7%A9%BA%E9%97%B4.png)
我尝试使用
pip3 install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html
但得到了
Installing collected packages: torch, torchvision, torchaudio
ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device
答案1
就我而言,问题在于“tmpfs”上的 /tmp/ 文件系统只有 2GB。为了进行安装,我将其增加到 10GB,安装成功。
增加到10G之前:
tmpfs tmpfs 2,0G 66M 2,0G 4% /tmp
出现此错误:
错误:由于 OSError 导致无法安装软件包:[Errno 28] 设备上的空间
增加到10G之后:
tmpfs tmpfs 10G 69M 10G 1% /tmp
没有错误。