我的电脑运行速度很快(处理器很棒,SSD 也不错),但软件中心需要 30 秒才能加载。这不是抱怨,我认为可能出了问题。Synaptic 需要一秒钟才能加载。
我运行了一下strace software-center
,看看它是否在破坏磁盘(它是 SSD - 我听不到它的声音),它正在启动并尝试打开一大堆文件。以下是摘录:
open("/usr/local/lib/python2.6/dist-packages/FlexGet-1.0r1465-py2.6.egg/StringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/FlexGet-1.0r1465-py2.6.egg/StringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/FlexGet-1.0r1465-py2.6.egg/StringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/python2.6/dist-packages/progressbar-2.3_dev-py2.6.egg/StringIO", 0x7fff19d3af30) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/progressbar-2.3_dev-py2.6.egg/StringIO.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/progressbar-2.3_dev-py2.6.egg/StringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/progressbar-2.3_dev-py2.6.egg/StringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/progressbar-2.3_dev-py2.6.egg/StringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/python2.6/dist-packages/pynzb-0.1.0-py2.6.egg/StringIO", 0x7fff19d3af30) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/pynzb-0.1.0-py2.6.egg/StringIO.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/pynzb-0.1.0-py2.6.egg/StringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/pynzb-0.1.0-py2.6.egg/StringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/pynzb-0.1.0-py2.6.egg/StringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/python2.6/dist-packages/PyRSS2Gen-1.0.0-py2.6.egg/StringIO", 0x7fff19d3af30) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/PyRSS2Gen-1.0.0-py2.6.egg/StringIO.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/PyRSS2Gen-1.0.0-py2.6.egg/StringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/PyRSS2Gen-1.0.0-py2.6.egg/StringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/PyRSS2Gen-1.0.0-py2.6.egg/StringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/python2.6/dist-packages/html5lib-0.90-py2.6.egg/StringIO", 0x7fff19d3af30) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/html5lib-0.90-py2.6.egg/StringIO.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/html5lib-0.90-py2.6.egg/StringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/html5lib-0.90-py2.6.egg/StringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/html5lib-0.90-py2.6.egg/StringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/python2.6/dist-packages/PyYAML-3.09-py2.6-linux-x86_64.egg/StringIO", 0x7fff19d3af30) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/PyYAML-3.09-py2.6-linux-x86_64.egg/StringIO.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/PyYAML-3.09-py2.6-linux-x86_64.egg/StringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/PyYAML-3.09-py2.6-linux-x86_64.egg/StringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/PyYAML-3.09-py2.6-linux-x86_64.egg/StringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/python2.6/dist-packages/transmissionrpc-0.6-py2.6.egg/StringIO", 0x7fff19d3af30) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/transmissionrpc-0.6-py2.6.egg/StringIO.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/transmissionrpc-0.6-py2.6.egg/StringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/transmissionrpc-0.6-py2.6.egg/StringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.6/dist-packages/transmissionrpc-0.6-py2.6.egg/StringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
这可能是一个转移注意力的话题。之后它停顿在这里:
poll([{fd=3, events=POLLIN}], 1, 25000) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"l\2\1\1\v\0\0\0\3\0\0\0=\0\0\0\6\1s\0\7\0\0\0:1.3497\0"..., 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 91
recvmsg(3, 0x7fff8c57cc00, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
sendmsg(3, {msg_name(0)=NULL, msg_iov(2)=[{"l\1\0\1\0\0\0\0\3\0\0\0{\0\0\0\1\1o\0\32\0\0\0/com/ubu"..., 144}, {"", 0}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 144
poll([{fd=3, events=POLLIN}], 1, 25000
然后它再次执行...这两次暂停占据了大部分加载时间。
然后事情真的发生了变化千轮询/读取/暂时不可用的线路。
那么这到底是怎么回事?为什么软件中心会扫描看似是 Python 包的内容StringIO
?错误?
那么为什么它会在看起来像是向 something.ubuntu.com 发出的 Web 请求(无法看到完整消息)时停滞不前?它为什么要与 ubuntu.com 对话?
答案1
它似乎正在获取可用软件包的完整最新视图(就像它apt-get update
所做的那样),这可能需要一段时间,具体取决于缓存的过期程度、软件存储库的响应速度以及网络连接速度。
正如评论中所提到的,刷新时缺乏交互性似乎是一个错误。
答案2
我也遇到同样的问题,第一次打开software-center时,打开速度很快,然后关闭后发现software-center进程没有被kill掉,第二次打开时,需要很长时间才能打开,解决办法是关闭software-center后,手动kill掉software-center进程。
我在 thinkpad w500 中使用 ubuntu11.04 amd64 arch。