无论我尝试安装哪个软件,都会出现以下错误
ramesh@ramesh-K56CA:~/cpract$ sudo apt-get install tlp tlp-rdw
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libxm4 : Depends: libmotif-common (= 2.3.4-5) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
现在如果我尝试使用 -f 然后我也会得到同样的错误
ramesh@ramesh-K56CA:~/cpract$ sudo apt-get -f install tlp tlp-rdw
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libxm4 : Depends: libmotif-common (= 2.3.4-5) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
你能帮助解决这个问题吗
even after the running sudo apt-get install -f to fix all dependancies i am getting the same error
ramesh@ramesh-K56CA:~/cpract$ sudo apt-get install -f
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:
lib32z1 libatk1.0-0:i386 libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386 libc6-i386 libcairo2:i386 libcups2:i386
libdatrie1:i386 libexpat1:i386 libffi6:i386 libfontconfig1:i386 libfreetype6:i386
libgcrypt11:i386 libgdk-pixbuf2.0-0:i386
libglib2.0-0:i386 libgnutls26:i386 libgpg-error0:i386 libgraphite2-3:i386 libgssapi-krb5-2:i386 libgtk2.0-0:i386 libharfbuzz0b:i386
libice6:i386 libjasper1:i386 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 libk5crypto3:i386 libkeyutils1:i386 libkrb5-3:i386
libkrb5support0:i386 libp11-kit0:i386 libpango-1.0-0:i386 libpangocairo-1.0-0:i386 libpangoft2-1.0-0:i386 libpixman-1-0:i386 libsm6:i386
libtasn1-6:i386 libthai0:i386 libtiff5:i386 libx11-6:i386 libxau6:i386 libxcb-render0:i386 libxcb-shm0:i386 libxcb1:i386
libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386 libxi6:i386 libxinerama1:i386
libxp6:i386 libxrandr2:i386 libxrender1:i386 libxt6:i386 nspluginviewer:i386 nspluginwrapper
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libmotif-common
The following NEW packages will be installed:
libmotif-common
0 upgraded, 1 newly installed, 0 to remove and 95 not upgraded.
5 not fully installed or removed.
Need to get 0 B/11.8 kB of archives.
After this operation, 116 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 168327 files and directories currently installed.)
Preparing to unpack .../libmotif-common_2.3.4-5_all.deb ..
Unpacking libmotif-common (2.3.4-5) ...
dpkg: error processing archive /var/cache/apt/archives/libmotif-common_2.3.4-5_all.deb (--unpack):
trying to overwrite '/usr/include/X11/bitmaps/xm_hour32', which is also in package libmotif4 2.3.4-
Errors were encountered while processing:
/var/cache/apt/archives/libmotif-common_2.3.4-5_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
ramesh@ramesh-K56CA:~/cpract$
ramesh@ramesh-K56CA:~/cpract$ sudo dpkg -P libmotif4
dpkg: dependency problems prevent removal of libmotif4:
libmotif4-dbg depends on libmotif4 (= 2.3.4-1).
motif-clients depends on libmotif4.
dpkg: error processing package libmotif4 (--purge):
dependency problems - not removing
Errors were encountered while processing:
libmotif4
ramesh@ramesh-K56CA:~/cpract$ sudo apt-get install -f
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:
lib32z1 libatk1.0-0:i386 libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386 libc6-i386 libcairo2:i386 libcups2:i386
libdatrie1:i386 libexpat1:i386 libffi6:i386 libfontconfig1:i386 libfreetype6:i386 libgcrypt11:i386 libgdk-pixbuf2.0-0:i386
libglib2.0-0:i386 libgnutls26:i386 libgpg-error0:i386 libgraphite2-3:i386 libgssapi-krb5-2:i386 libgtk2.0-0:i386 libharfbuzz0b:i386
libice6:i386 libjasper1:i386 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 libk5crypto3:i386 libkeyutils1:i386 libkrb5-3:i386
libkrb5support0:i386 libp11-kit0:i386 libpango-1.0-0:i386 libpangocairo-1.0-0:i386 libpangoft2-1.0-0:i386 libpixman-1-0:i386 libsm6:i386
libtasn1-6:i386 libthai0:i386 libtiff5:i386 libx11-6:i386 libxau6:i386 libxcb-render0:i386 libxcb-shm0:i386 libxcb1:i386
libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386 libxi6:i386 libxinerama1:i386
libxp6:i386 libxrandr2:i386 libxrender1:i386 libxt6:i386 nspluginviewer:i386 nspluginwrapper
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libmotif-common
The following NEW packages will be installed:
libmotif-common
0 upgraded, 1 newly installed, 0 to remove and 95 not upgraded.
5 not fully installed or removed.
Need to get 0 B/11.8 kB of archives.
After this operation, 116 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 168327 files and directories currently installed.)
Preparing to unpack .../libmotif-common_2.3.4-5_all.deb ...
Unpacking libmotif-common (2.3.4-5) ...
dpkg: error processing archive /var/cache/apt/archives/libmotif-common_2.3.4-5_all.deb (--unpack):
trying to overwrite '/usr/include/X11/bitmaps/xm_hour32', which is also in package libmotif4 2.3.4-1
E: Sub-process /usr/bin/dpkg returned an error code (1)
ramesh@ramesh-K56CA:~/cpract$
ramesh@ramesh-K56CA:~/cpract$ sudo dpkg -P --force-remove-reinstreq libmotif4
dpkg: dependency problems prevent removal of libmotif4:
libmotif4-dbg depends on libmotif4 (= 2.3.4-1).
motif-clients depends on libmotif4.
dpkg: error processing package libmotif4 (--purge):
dependency problems - not removing
Errors were encountered while processing:
libmotif4
ramesh@ramesh-K56CA:~/cpract$ sudo dpkg -P --force-all --force-remove-reinstreq libmotif4
dpkg: libmotif4: dependency problems, but removing anyway as you requested:
libmotif4-dbg depends on libmotif4 (= 2.3.4-1).
motif-clients depends on libmotif4.
(Reading database ... 168326 files and directories currently installed.)
Removing libmotif4 (2.3.4-1) ...
Purging configuration files for libmotif4 (2.3.4-1) ...
Processing triggers for libc-bin (2.19-0ubuntu6) ...
ramesh@ramesh-K56CA:~/cpract$ sudo apt-get install -f
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:
lib32z1 libatk1.0-0:i386 libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386 libc6-i386 libcairo2:i386 libcups2:i386
libdatrie1:i386 libexpat1:i386 libffi6:i386 libfontconfig1:i386 libfreetype6:i386 libgcrypt11:i386 libgdk-pixbuf2.0-0:i386
libglib2.0-0:i386 libgnutls26:i386 libgpg-error0:i386 libgraphite2-3:i386 libgssapi-krb5-2:i386 libgtk2.0-0:i386 libharfbuzz0b:i386
libice6:i386 libjasper1:i386 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 libk5crypto3:i386 libkeyutils1:i386 libkrb5-3:i386
libkrb5support0:i386 libp11-kit0:i386 libpango-1.0-0:i386 libpangocairo-1.0-0:i386 libpangoft2-1.0-0:i386 libpixman-1-0:i386 libsm6:i386
libtasn1-6:i386 libthai0:i386 libtiff5:i386 libx11-6:i386 libxau6:i386 libxcb-render0:i386 libxcb-shm0:i386 libxcb1:i386
libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386 libxi6:i386 libxinerama1:i386
libxp6:i386 libxrandr2:i386 libxrender1:i386 libxt6:i386 nspluginviewer:i386 nspluginwrapper
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libmotif-common libmotif4-dbg motif-clients mwm
The following NEW packages will be installed:
libmotif-common mwm
The following packages will be upgraded:
libmotif4-dbg motif-clients
2 upgraded, 2 newly installed, 0 to remove and 92 not upgraded.
5 not fully installed or removed.
Need to get 4,382 kB/4,553 kB of archives.
After this operation, 6,816 kB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://in.archive.ubuntu.com/ubuntu/ trusty/universe libmotif4-dbg amd64 2.3.4-5 [4,378 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu/ trusty/universe motif-clients all 2.3.4-5 [3,300 B]
Fetched 4,382 kB in 15s (285 kB/s)
(Reading database ... 168277 files and directories currently installed.)
Preparing to unpack .../libmotif-common_2.3.4-5_all.deb ...
Unpacking libmotif-common (2.3.4-5) ...
Preparing to unpack .../archives/mwm_2.3.4-5_amd64.deb ...
Unpacking mwm (2.3.4-5) ...
dpkg: error processing archive /var/cache/apt/archives/mwm_2.3.4-5_amd64.deb (--unpack):
trying to overwrite '/usr/share/man/man4/mwmrc.4.gz', which is also in package motif-clients 2.3.4-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to unpack .../libmotif4-dbg_2.3.4-5_amd64.deb ...
Unpacking libmotif4-dbg:amd64 (2.3.4-5) over (2.3.4-1) ...
Preparing to unpack .../motif-clients_2.3.4-5_all.deb ...
Unpacking motif-clients (2.3.4-5) over (2.3.4-1) ...
dpkg: warning: unable to delete old directory '/etc/X11/mwm': Directory not empty
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for menu (2.1.46ubuntu1) ...
Warning: the string include-menu-defs did not occur in template file /etc/X11/mwm//system.mwmrc-menu
Errors were encountered while processing:
/var/cache/apt/archives/mwm_2.3.4-5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
ramesh@ramesh-K56CA:~/cpract$
答案1
尝试安装将要安装的软件包和将不会安装的软件包:
sudo apt-get install tlp tlp-rdw libmotif-common