每当我尝试运行任何 apt-get 命令时,都会收到此错误。目前我正在尝试运行sudo apt-get update
。我还注意到是/var/lib/apt/lists
空的。
我该如何使用显示已安装应用程序的所需文件重新填充此目录?是否有可用的启动修复 CD 或其他东西来修复此问题?
当我尝试运行时出现以下错误apt-get update
,
sudo apt-get update
[sudo] password for preston:
E: Sub-process returned an error code
我正在使用 Ubuntu 13.10
运行@muru 在下面发布的命令后,输出如下:
$ sudo strace apt-get update
[sudo] password for preston:
Sorry, try again.
[sudo] password for preston:
execve("/usr/bin/apt-get", ["apt-get", "update"], [/* 14 vars */]) = 0
brk(0) = 0x245e000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5971c90000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=47071, ...}) = 0
mmap(NULL, 47071, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f5971c84000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\24\3\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1287048, ...}) = 0
mmap(NULL, 3383888, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5971735000
mprotect(0x7f597186a000, 2097152, PROT_NONE) = 0
mmap(0x7f5971a6a000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x135000) = 0x7f5971a6a000
mmap(0x7f5971a6f000, 592, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f5971a6f000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\265\5\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=979056, ...}) = 0
mmap(NULL, 3159072, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5971431000
mprotect(0x7f5971517000, 2093056, PROT_NONE) = 0
mmap(0x7f5971716000, 40960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe5000) = 0x7f5971716000
mmap(0x7f5971720000, 82976, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f5971720000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360*\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=88408, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5971c83000
mmap(NULL, 2184224, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f597121b000
mprotect(0x7f5971230000, 2093056, PROT_NONE) = 0
mmap(0x7f597142f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000) = 0x7f597142f000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\36\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1853400, ...}) = 0
mmap(NULL, 3961912, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5970e53000
mprotect(0x7f5971010000, 2097152, PROT_NONE) = 0
mmap(0x7f5971210000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bd000) = 0x7f5971210000
mmap(0x7f5971216000, 17464, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f5971216000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libutil.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\17\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=10680, ...}) = 0
mmap(NULL, 2105624, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5970c50000
mprotect(0x7f5970c52000, 2093056, PROT_NONE) = 0
mmap(0x7f5970e51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f5970e51000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14664, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5971c82000
mmap(NULL, 2109736, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5970a4c000
mprotect(0x7f5970a4f000, 2093056, PROT_NONE) = 0
mmap(0x7f5970c4e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f5970c4e000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\36\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=100728, ...}) = 0
mmap(NULL, 2195784, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5970833000
mprotect(0x7f597084b000, 2093056, PROT_NONE) = 0
mmap(0x7f5970a4a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f5970a4a000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libbz2.so.1.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\23\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=66600, ...}) = 0
mmap(NULL, 2161864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5970623000
mprotect(0x7f5970632000, 2093056, PROT_NONE) = 0
mmap(0x7f5970831000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe000) = 0x7f5970831000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0T\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1063328, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5971c81000
mmap(NULL, 3158344, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f597031f000
mprotect(0x7f5970422000, 2093056, PROT_NONE) = 0
mmap(0x7f5970621000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x102000) = 0x7f5970621000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5971c80000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5971c7e000
arch_prctl(ARCH_SET_FS, 0x7f5971c7e740) = 0
mprotect(0x7f5971210000, 16384, PROT_READ) = 0
mprotect(0x7f5970621000, 4096, PROT_READ) = 0
mprotect(0x7f5970831000, 4096, PROT_READ) = 0
mprotect(0x7f5970a4a000, 4096, PROT_READ) = 0
mprotect(0x7f5970c4e000, 4096, PROT_READ) = 0
mprotect(0x7f5970e51000, 4096, PROT_READ) = 0
mprotect(0x7f597142f000, 4096, PROT_READ) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5971c7d000
mprotect(0x7f5971716000, 32768, PROT_READ) = 0
mprotect(0x7f5971a6a000, 16384, PROT_READ) = 0
mprotect(0x632000, 4096, PROT_READ) = 0
mprotect(0x7f5971c92000, 4096, PROT_READ) = 0
munmap(0x7f5971c84000, 47071) = 0
brk(0) = 0x245e000
brk(0x247f000) = 0x247f000
open("/dev/null", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=1607664, ...}) = 0
mmap(NULL, 1607664, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7f5971af4000
close(4) = 0
stat("/var/lib/apt/.", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/etc/apt/apt.conf.d/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/etc/apt/apt.conf.d/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=26258, ...}) = 0
mmap(NULL, 26258, PROT_READ, MAP_SHARED, 4, 0) = 0x7f5971c89000
close(4) = 0
openat(AT_FDCWD, "/etc/apt/apt.conf.d/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
getdents(4, /* 17 entries */, 32768) = 592
getdents(4, /* 0 entries */, 32768) = 0
close(4) = 0
open("/etc/apt/apt.conf.d/00CDMountPoint", O_RDONLY) = 4
read(4, "Acquire::cdrom {\n mount \"/media"..., 8191) = 82
read(4, "", 8191) = 0
close(4) = 0
open("/etc/apt/apt.conf.d/00aptitude", O_RDONLY) = 4
read(4, "Aptitude::Get-Root-Command \"sudo"..., 8191) = 49
read(4, "", 8191) = 0
close(4) = 0
open("/etc/apt/apt.conf.d/00trustcdrom", O_RDONLY) = 4
read(4, "APT::Authentication::TrustCDROM "..., 8191) = 40
read(4, "", 8191) = 0
close(4) = 0
open("/etc/apt/apt.conf.d/01autoremove", O_RDONLY) = 4
read(4, "APT\n{\n NeverAutoRemove\n {\n\t\"^f"..., 8191) = 350
read(4, "", 8191) = 0
close(4) = 0
open("/etc/apt/apt.conf.d/01autoremove-kernels", O_RDONLY) = 4
read(4, "// File autogenerated by /etc/ke"..., 8191) = 642
read(4, "", 8191) = 0
close(4) = 0
open("/etc/apt/apt.conf.d/05aptitude", O_RDONLY) = 4
read(4, "aptitude::Keep-Unused-Pattern \"^"..., 8191) = 157
read(4, "", 8191) = 0
close(4) = 0
open("/etc/apt/apt.conf.d/10periodic", O_RDONLY) = 4
read(4, "APT::Periodic::Update-Package-Li"..., 8191) = 129
read(4, "", 8191) = 0
close(4) = 0
open("/etc/apt/apt.conf.d/15update-stamp", O_RDONLY) = 4
read(4, "APT::Update::Post-Invoke-Success"..., 8191) = 108
read(4, "", 8191) = 0
close(4) = 0
open("/etc/apt/apt.conf.d/20apt-show-versions", O_RDONLY) = 4
read(4, "// When Apt's cache is updated ("..., 8191) = 164
read(4, "", 8191) = 0
close(4) = 0
open("/etc/apt/apt.conf.d/20archive", O_RDONLY) = 4
read(4, "APT::Archives::MaxAge \"30\";\nAPT:"..., 8191) = 85
read(4, "", 8191) = 0
close(4) = 0
open("/etc/apt/apt.conf.d/20auto-upgrades", O_RDONLY) = 4
read(4, "APT::Periodic::Update-Package-Li"..., 8191) = 80
read(4, "", 8191) = 0
close(4) = 0
open("/etc/apt/apt.conf.d/20changelog", O_RDONLY) = 4
read(4, "// Server information for apt-ch"..., 8191) = 123
read(4, "", 8191) = 0
close(4) = 0
open("/etc/apt/apt.conf.d/50unattended-upgrades", O_RDONLY) = 4
read(4, "// Automatically upgrade package"..., 8191) = 2138
read(4, "", 8191) = 0
close(4) = 0
open("/etc/apt/apt.conf.d/70debconf", O_RDONLY) = 4
read(4, "// Pre-configure all packages wi"..., 8191) = 182
read(4, "", 8191) = 0
close(4) = 0
open("/etc/apt/apt.conf.d/99update-notifier", O_RDONLY) = 4
read(4, "DPkg::Post-Invoke {\"if [ -d /var"..., 8191) = 231
read(4, "", 8191) = 0
close(4) = 0
stat("/etc/apt/apt.conf", 0x7fff8619bb50) = -1 ENOENT (No such file or directory)
stat("/var/lib/dpkg/status", {st_mode=S_IFREG|0644, st_size=1252691, ...}) = 0
stat("/usr/bin/dpkg", {st_mode=S_IFREG|0755, st_size=257632, ...}) = 0
stat("/etc/debian_version", {st_mode=S_IFREG|0644, st_size=11, ...}) = 0
stat("", 0x7fff8619bbd0) = -1 ENOENT (No such file or directory)
getuid() = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f5970e89ff0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGWINCH, {0x409fd0, [WINCH], SA_RESTORER|SA_RESTART, 0x7f5970e89ff0}, {SIG_DFL, [], 0}, 8) = 0
ioctl(1, TIOCGWINSZ, {ws_row=54, ws_col=211, ws_xpixel=0, ws_ypixel=0}) = 0
stat("/etc/apt/sources.list", 0x7fff8619b570) = -1 ENOENT (No such file or directory)
stat("/etc/apt/sources.list.d/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/etc/apt/sources.list.d/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/etc/apt/sources.list.d/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/etc/apt/sources.list.d/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
getdents(4, /* 2 entries */, 32768) = 48
getdents(4, /* 0 entries */, 32768) = 0
close(4) = 0
stat("/var/lib/apt/lists/partial/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/var/cache/apt/archives/partial/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/var/lib/apt/lists/lock", O_RDWR|O_CREAT|O_NOFOLLOW, 0640) = 4
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
fcntl(4, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5971c88000
) = 2
stat("/var/lib/apt/lists/", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
openat(AT_FDCWD, "/var/lib/apt/lists/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 5
getcwd("/home/preston", 298) = 14
chdir("/var/lib/apt/lists/") = 0
getdents(5, /* 4 entries */, 32768) = 104
getdents(5, /* 0 entries */, 32768) = 0
close(5) = 0
chdir("/home/preston/") = 0
stat("/var/lib/apt/lists/partial/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/var/lib/apt/lists/partial/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 5
getcwd("/home/preston", 298) = 14
chdir("/var/lib/apt/lists/partial/") = 0
getdents(5, /* 2 entries */, 32768) = 48
getdents(5, /* 0 entries */, 32768) = 0
close(5) = 0
chdir("/home/preston/") = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f5971c7ea10) = 11800
wait4(11800, [{WIFEXITED(s) && WEXITSTATUS(s) == 100}], 0, NULL) = 11800
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=11800, si_status=100, si_utime=0, si_stime=0} ---
rt_sigaction(SIGQUIT, {SIG_DFL, [QUIT], SA_RESTORER|SA_RESTART, 0x7f5970e89ff0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL, [INT], SA_RESTORER|SA_RESTART, 0x7f5970e89ff0}, {SIG_DFL, [], 0}, 8) = 0
close(4) = 0
stat("/var/cache/apt/pkgcache.bin", 0x7fff8619b510) = -1 ENOENT (No such file or directory)
stat("/var/cache/apt/srcpkgcache.bin", 0x7fff8619b510) = -1 ENOENT (No such file or directory)
stat("/var/cache/apt/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/var/cache/apt/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/var/cache/apt/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
getdents(4, /* 3 entries */, 32768) = 80
stat("/var/cache/apt/archives", {st_mode=S_IFDIR|0755, st_size=69632, ...}) = 0
getdents(4, /* 0 entries */, 32768) = 0
close(4) = 0
stat("/var/cache/apt/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/var/cache/apt/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/var/cache/apt/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
getdents(4, /* 3 entries */, 32768) = 80
stat("/var/cache/apt/archives", {st_mode=S_IFDIR|0755, st_size=69632, ...}) = 0
getdents(4, /* 0 entries */, 32768) = 0
close(4) = 0
open("/var/lib/dpkg/lock", O_RDWR|O_CREAT|O_NOFOLLOW, 0640) = 4
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
fcntl(4, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
openat(AT_FDCWD, "/var/lib/dpkg/updates/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 5
getdents(5, /* 2 entries */, 32768) = 48
getdents(5, /* 0 entries */, 32768) = 0
close(5) = 0
close(4) = 0
write(2, "E", 1E) = 1
write(2, ": ", 2: ) = 2
write(2, "Sub-process returned an error co"..., 34Sub-process returned an error code) = 34
write(2, "\n", 1
) = 1
close(3) = 0
exit_group(100) = ?
+++ exited with 100 +++
答案1
还应该注意,如果您E: Sub-process returned an error code
在运行时出现类似的情况apt-get remove [pkg]
或在运行时出现错误,apt-get update
您可能需要确保您的/tmp
目录没有被删除。
重新创建/tmp
目录修复了我的错误,因为没有应用程序可以使用临时目录来存储临时文件。正如上次回复中提到的http://ubuntuforums.org/showthread.php?t=1677090
。
为了完整性,我做了这个回答。
答案2
您的安装是否可能不完整?如果是这种情况,您可以使用 进行更正sudo apt-get install -f
。这可能会解决您的问题。
如果再次运行时错误仍未消除sudo apt-get update
,您可以尝试运行
sudo dpkg --configure -a
sudo apt-get install -f
过去,如果 dpkg 是出现错误的子进程,它通常会显示在错误消息中,但它可能仍然是问题的根源。
答案3
我有/tmp
现有的,但是它有不必要的文件/目录,我已将其删除:
rm -rf /tmp/*
执行完毕sudo apt update
,一切正常。
答案4
我使用这两个命令并且效果很好。
sudo apt-get remove libappstream3
sudo apt remove libappstream3