无法安装 vsftpd - E: 子进程 /usr/bin/dpkg 返回错误代码 (1)

无法安装 vsftpd - E: 子进程 /usr/bin/dpkg 返回错误代码 (1)

运行后sudo apt-get install vsftpd我得到:

Errors were encountered while processing:
/var/cache/apt/archives/vsftpd_3.0.2-1ubuntu2.14.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我尝试删除/var/cache/apt/archives/vsftpd_3.0.2-1ubuntu2.14.04.1_amd64.deb,但仍然无效。

root@:~# sudo apt-get install vsftpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.13.0-36 linux-headers-3.13.0-36-generic
  linux-image-3.13.0-36-generic linux-image-extra-3.13.0-36-generic
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  vsftpd
0 upgraded, 1 newly installed, 0 to remove and 92 not upgraded.
Need to get 111 kB of archives.
After this operation, 361 kB of additional disk space will be used.
Get:1 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main vsftpd amd64 3.0.2-1ubuntu2.14.04.1 [111 kB]
Fetched 111 kB in 0s (3,120 kB/s)
Preconfiguring packages ...
(Reading database ... 130373 files and directories currently installed.)
Preparing to unpack .../vsftpd_3.0.2-1ubuntu2.14.04.1_amd64.deb ...
Unpacking vsftpd (3.0.2-1ubuntu2.14.04.1) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: Cannot allocate memory
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/vsftpd_3.0.2-1ubuntu2.14.04.1_amd64.deb (--unpack):
 subprocess dpkg-deb --fsys-tarfile returned error exit status 2
No apport report written because the error message indicates an issue on the local system
         Errors were encountered while processing:
 /var/cache/apt/archives/vsftpd_3.0.2-1ubuntu2.14.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

解决。我注意到sudo apt-get install vsftpd我的日志中出现此错误后

dpkg-deb (subprocess): decompressing archive member: lzma error: Cannot allocate memory

这意味着我必须释放一些 RAM。因此我终止了另一个进程,现在一切正常。

相关内容