1

I am using debian 9.I tried to install the tex application, but it didn't work. Now I can't install any other application in my Debian machine.

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).

Additionally, when I try 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

The output of grep ^ /etc/apt/sources.list{,.d/*} is

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# 

This is the output of command 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

How to make some space in /usr?

  • 1
    "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)" – Ipor Sircer Oct 17 '18 at 16:02
  • 1
    Hello and welcome to the U&l stack exchange! Please review the Help Center for information on how to best post to this site. To get to your question, it appears according to your output that your disk or partition /usr is out of space. Consider making some space on the disk where /usr/lib is located. Please update your post with output of your sources.list or sources.list.d depending on which one you use. Thank you. – kemotep Oct 17 '18 at 16:21
  • 1
    Welcome , please add the output of grep ^ /etc/apt/sources.list{,.d/*} – GAD3R Oct 17 '18 at 16:56
1

use

sudo apt autoremove

and then install blechbit by

sudo apt install bleachbit

bleachbit will help you clean unnecessary files off your device

1

Edit your /etc/apt/sources.list as described on the official documentataion. Or copy and past the following line into the termial:

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

Remove the Ubuntu repository trusty , xenial and 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

Then run:

apt update && apt dist-upgrade
apt --fix-broken install

Edit

You can clean up your system using:

apt autoremove
apt clean 
apt autoclean 

Removing the old kernels and kernel headers, you can list them through:

dpkg --list 'linux-headers*'
dpkg --list 'linux-image*'

Then install and configure the localpurge pacakge (see man localepurge) then run it :

localepurge

a sample output:

localepurge: Disk space freed in /usr/* : X KiB

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.