我正在使用 debian 9。我尝试安装 tex 应用程序,但它不起作用。现在我无法在我的 Debian 机器上安装任何其他应用程序。
root@debian:/etc/apt# apt-get install tuxpaint
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
perl : Depends: perl-base (= 5.24.1-3+deb9u4) but 5.24.1-3+deb9u2 is to be installed
Depends: perl-modules-5.24 (>= 5.24.1-3+deb9u4) but 5.24.1-3+deb9u2 is to be installed
Depends: libperl5.24 (= 5.24.1-3+deb9u4) but 5.24.1-3+deb9u2 is to be installed
tuxpaint : Depends: tuxpaint-plugins-default (>= 1:0.9.22-1) but it is not going to be installed or
tuxpaint-plugins
Depends: tuxpaint-data (= 1:0.9.22-3) but it is not going to be installed
Depends: libsdl-mixer1.2 but it is not going to be installed
Depends: libsdl-pango1 but it is not going to be installed
Depends: libsdl-ttf2.0-0 but it is not going to be installed
Recommends: tuxpaint-config but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
另外,当我尝试时apt --fix-broken install
:
root@debian:/home/midhun# apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
aptitude-common authbind bnd fonts-texgyre glassfish-jmac-api groovy ivy
java-wrappers libaopalliance-java libasm-java libatinject-jsr330-api-java
libbcpg-java libbcprov-java libbindex-java libbsh-java libcdi-api-java
libcglib-java libclassworlds-java libcommons-cli-java libcommons-codec-java
libcommons-collections3-java libcommons-httpclient-java libcommons-io-java
libcommons-lang-java libcommons-lang3-java libcwidget3v5 libdom4j-java
libdoxia-core-java libeasymock-java libeclipse-aether-java
libfelix-osgi-obr-java libfindbugs-java
libgeronimo-interceptor-3.0-spec-java libgoogle-gson-java
libgpars-groovy-java libgradle-core-java libgradle-plugins-java
libguava-java libguice-java libhawtjni-runtime-java libhttpclient-java
libhttpcore-java libisorelax-java libjansi-java libjansi-native-java
libjarjar-java libjatl-java libjaxen-java libjcifs-java
libjcip-annotations-java libjcommander-java libjcsp-java libjdom1-java
libjetty9-extra-java libjetty9-java libjformatstring-java libjline2-java
libjna-java libjna-jni libjsoup-java libjsr166y-java libjsr305-java
libkryo-java libkxml2-java liblogback-java libmaven-parent-java
libmaven2-core-java libmaven3-core-java libminlog-java libmsv-java
libmultiverse-core-java libnative-platform-java libnative-platform-jni
libnekohtml-java libnetty-3.9-java libobjenesis-java libosgi-annotation-java
libosgi-compendium-java libosgi-core-java libplexus-ant-factory-java
libplexus-archiver-java libplexus-bsh-factory-java libplexus-cipher-java
libplexus-classworlds-java libplexus-classworlds2-java libplexus-cli-java
libplexus-component-annotations-java libplexus-component-metadata-java
libplexus-container-default-java libplexus-container-default1.5-java
libplexus-containers-java libplexus-containers1.5-java
libplexus-interactivity-api-java libplexus-interpolation-java
libplexus-io-java libplexus-sec-dispatcher-java libplexus-utils-java
libplexus-utils2-java libpolyglot-maven-java libqdox-java libqdox2-java
libreflectasm-java librelaxng-datatype-java librhino-java
libsimple-http-java libsisu-inject-java libsisu-plexus-java
libspring-beans-java libspring-core-java libtaglibs-standard-impl-java
libtaglibs-standard-spec-java libtcnative-1 libwagon-java libwagon2-java
libxbean-java libxom-java libxpp2-java libxpp3-java libxstream-java
libyaml-snake-java libyaml-tiny-perl ps2eps testng texlive-font-utils
texlive-fonts-recommended-doc texlive-generic-recommended texlive-latex-base
texlive-latex-recommended texlive-pictures tipa
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
libperl5.24 perl-base perl-modules-5.24
The following packages will be upgraded:
libperl5.24 perl-base perl-modules-5.24
3 upgraded, 0 newly installed, 0 to remove and 260 not upgraded.
1 not fully installed or removed.
Need to get 0 B/7,313 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 258549 files and directories currently installed.)
Preparing to unpack .../perl-base_5.24.1-3+deb9u4_i386.deb ...
Unpacking perl-base (5.24.1-3+deb9u4) over (5.24.1-3+deb9u2) ...
dpkg: error processing archive /var/cache/apt/archives/perl-base_5.24.1-3+deb9u4_i386.deb (--unpack):
cannot copy extracted data for './usr/lib/i386-linux-gnu/perl-base/lib.pm' to '/usr/lib/i386-linux-gnu/perl-base/lib.pm.dpkg-new': failed to write (No space left on device)
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/perl-base_5.24.1-3+deb9u4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@debian:/home/midhun# ^C
grep ^ /etc/apt/sources.list{,.d/*} 的输出是
root@debian:/usr/bin# grep ^ /etc/apt/sources.list{,.d/*}
/etc/apt/sources.list:deb http://deb.debian.org/debian stretch main contrib non-free
/etc/apt/sources.list:deb-src http://deb.debian.org/debian stretch main contrib non-free
/etc/apt/sources.list:
/etc/apt/sources.list.d/getdeb.list:deb http://archive.getdeb.net/ubuntu xenial-getdeb apps
/etc/apt/sources.list.d/getdeb.list:deb http://archive.getdeb.net/ubuntu xenial-getdeb apps
/etc/apt/sources.list.d/java-8-debian.list:deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
/etc/apt/sources.list.d/java-8-debian.list:deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
/etc/apt/sources.list.d/java-8-debian.list.save:deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
/etc/apt/sources.list.d/java-8-debian.list.save:deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
/etc/apt/sources.list.d/nodesource.list:deb https://deb.nodesource.com/node_9.x stretch main
/etc/apt/sources.list.d/nodesource.list:deb-src https://deb.nodesource.com/node_9.x stretch main
/etc/apt/sources.list.d/nodesource.list.save:deb https://deb.nodesource.com/node_9.x stretch main
/etc/apt/sources.list.d/nodesource.list.save:deb-src https://deb.nodesource.com/node_9.x stretch main
/etc/apt/sources.list.d/stretch-backports.list:deb http://deb.debian.org/debian stretch-backports main contrib
/etc/apt/sources.list.d/stretch-backports.list.save:deb http://deb.debian.org/debian stretch-backports main contrib
/etc/apt/sources.list.d/sublime-text.list:deb https://download.sublimetext.com/ apt/stable/
/etc/apt/sources.list.d/sublime-text.list.save:deb https://download.sublimetext.com/ apt/stable/
/etc/apt/sources.list.d/webupd8team-ubuntu-atom-cosmic.list:deb http://ppa.launchpad.net/webupd8team/atom/ubuntu cosmic main
/etc/apt/sources.list.d/webupd8team-ubuntu-atom-cosmic.list:# deb-src http://ppa.launchpad.net/webupd8team/atom/ubuntu cosmic main
root@debian:/usr/bin#
这是命令 df -h 的输出
root@debian:/home/midhun# df -h
Filesystem Size Used Avail Use% Mounted on
udev 4.0G 0 4.0G 0% /dev
tmpfs 807M 9.4M 798M 2% /run
/dev/sda11 91G 11G 76G 12% /
/dev/sda13 9.2G 9.1G 0 100% /usr
tmpfs 4.0G 29M 4.0G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 4.0G 0 4.0G 0% /sys/fs/cgroup
/dev/sda15 9.2G 37M 8.6G 1% /tmp
/dev/sda16 9.2G 869M 7.8G 10% /usr/local
/dev/sda12 19G 18G 32M 100% /home
/dev/sda14 9.2G 4.6G 4.1G 53% /var
/dev/sda18 7.3G 34M 6.9G 1% /srv
/dev/sda19 15G 73M 14G 1% /boot
/dev/sda17 9.2G 1.2G 7.5G 14% /opt
tmpfs 807M 16K 807M 1% /run/user/115
tmpfs 807M 28K 807M 1% /run/user/1000
如何在/usr中腾出一些空间?
答案1
使用
sudo apt 自动删除
然后安装blechbit
sudo apt安装bleachbit
漂白位将帮助您清除设备上不必要的文件
答案2
/etc/apt/sources.list
按照描述编辑您的官方文档。或者将以下行复制并粘贴到终端中:
cat <<EOF > /etc/apt/sources.list
deb http://deb.debian.org/debian stretch main contrib non-free
deb-src http://deb.debian.org/debian stretch main contrib non-free
deb http://deb.debian.org/debian-security/ stretch/updates main contrib non-free
deb-src http://deb.debian.org/debian-security/ stretch/updates main contrib non-free
deb http://deb.debian.org/debian stretch-updates main contrib non-free
deb-src http://deb.debian.org/debian stretch-updates main contrib non-free
EOF
删除 Ubuntu 存储库 trusty 、 xenial 和 cosmic :
rm /etc/apt/sources.list.d/webupd8team-ubuntu-atom-cosmic.list
rm /etc/apt/sources.list.d/java-8-debian.list
rm /etc/apt/sources.list.d/getdeb.list
然后运行:
apt update && apt dist-upgrade
apt --fix-broken install
编辑
您可以使用以下方法清理系统:
apt autoremove
apt clean
apt autoclean
删除旧的内核和内核头,您可以通过以下方式列出它们:
dpkg --list 'linux-headers*'
dpkg --list 'linux-image*'
然后安装并配置localpurge
pacakge(请参阅man localepurge
),然后运行它:
localepurge
示例输出:
localepurge: Disk space freed in /usr/* : X KiB