我对 Linux 还很陌生,但我用的是笔记本电脑,电池电量计会非常有用。每当我尝试
sudo apt-get install indicator-power
它给了我:
`Reading package lists... Done
Building dependency tree
Reading state information... Done
indicator-power is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up oracle-java7-installer (7u40-0~webupd8~0) ...
Downloading Oracle Java 7...
--2013-09-24 20:06:32-- http://download.oracle.com/otn-pub/java/jdk/7u40-b43/jdk-7u40-linux-x64.tar.gz
Resolving false (false)... failed: No such file or directory.
wget: unable to resolve host address ‘false’
download failed
Oracle JDK 7 is NOT installed.
dpkg: error processing oracle-java7-installer (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)`
任何帮助都将不胜感激!
@Braiam 当我运行第一个命令来更正存储库时,它返回了以下内容:
Can't rename /etc/apt/sources.list.d/iaz-battery-status-quantal.list /etc/apt /sources.list.disable.d/iaz-battery-status-quantal.list.disable: No such file or directory
Can't rename /etc/apt/sources.list.d/ubuntu-wine-ppa-quantal.list /etc/apt/sources.list.disable.d/ubuntu-wine-ppa-quantal.list.disable: No such file or directory
Can't rename /etc/apt/sources.list.d/webupd8team-java-raring.list /etc/apt/sources.list.disable.d/webupd8team-java-raring.list.disable: No such file or directory
@Braiam,现在当我用那行运行它时,在我输入的每一行之后,除了这些之外,其他一切似乎都已经起作用之后,都会出现这样的响应:
N: Ignoring file 'ubuntu-wine-ppa-quantal.list.disable' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'iaz-battery-status-quantal.list.disable' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'webupd8team-java-raring.list.disable' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'ubuntu-wine-ppa-quantal.list.disable' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'iaz-battery-status-quantal.list.disable' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'webupd8team-java-raring.list.disable' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
答案1
问题是您有一些混合存储库。请执行以下操作:
sudo rename -n 's/\.list$/.list.disable/g' /etc/apt/sources.list.d/*.list
sudo apt-get update
sudo apt-get -f remove oracle-java7-installer
sudo apt-get autoremove
sudo apt-get -f install
sudo apt-get install indicator-power
第一行禁用任何非官方的存储库,第二行更新软件包列表,第四行尝试修复任何错误,最后安装软件包。
答案2
要安装 oracle java SDK 7,只需在软件中心搜索并安装即可。如果您将来需要下载任何其他软件,则应检查软件中心,它们有很多选择。