我想使用 安装python-numpy
。但是,我无法安装它,所以我想使用apt-get -f install
。还有另一个问题。你能帮助我吗?非常感谢!
root@hly:~# apt-get install python-numpy
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:
cracklib-runtime : Depends: file
hplip : Depends: cups (>= 1.1.20)
indicator-printers : Depends: cups (>= 1.5)
language-pack-en-base : Depends: locales (>= 2.3.6)
libfontconfig1-dev : Depends: libexpat1-dev but it is not going to be installed
Depends: libfreetype6-dev (>= 2.1.7) but it is not going to be installed
libfontenc-dev : Depends: zlib1g-dev but it is not going to be installed
libfuntools1 : Depends: libc6-dev but it is not going to be installed
libncurses5-dev : Depends: libc6-dev but it is not going to be installed or
libc-dev
libpython2.7-dev : Depends: libexpat1-dev but it is not going to be installed
Recommends: libc6-dev but it is not going to be installed or
libc-dev
lintian : Depends: file
printer-driver-gutenprint : Depends: cups (>= 1.3.0)
printer-driver-hpcups : Depends: cups
Depends: cups (>= 1.4.0) or
cupsddk but it is not installable
printer-driver-splix : Depends: cups (>= 1.5.0-3~)
python-numpy : Depends: libblas3 but it is not going to be installed or
libblas.so.3
Depends: liblapack3 but it is not going to be installed or
liblapack.so.3
ubuntu-standard : Depends: file
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@hly:~# apt-get -f 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:
libdmx-dev libdmx1 libdrm-dev libfs-dev libfs6 libgfortran-5-dev libice-dev
libmircookie-dev libmircookie2 libmircore-dev libpciaccess-dev
libpixman-1-dev libpthread-stubs0-dev libsm-dev libx11-dev libx11-doc
libxau-dev libxaw7-dev libxcb1-dev libxcomposite-dev libxcursor-dev
libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxfont2 libxi-dev
libxinerama-dev libxkbcommon-dev libxkbfile-dev libxmu-dev libxmu-headers
libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev
libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86dga-dev libxxf86vm-dev
mesa-common-dev x11proto-bigreqs-dev x11proto-composite-dev
x11proto-core-dev x11proto-damage-dev x11proto-dmx-dev x11proto-dri2-dev
x11proto-dri3-dev x11proto-fixes-dev x11proto-fonts-dev x11proto-gl-dev
x11proto-input-dev x11proto-kb-dev x11proto-present-dev x11proto-randr-dev
x11proto-record-dev x11proto-render-dev x11proto-resource-dev
x11proto-scrnsaver-dev x11proto-video-dev x11proto-xcmisc-dev
x11proto-xext-dev x11proto-xf86bigfont-dev x11proto-xf86dga-dev
x11proto-xf86dri-dev x11proto-xf86vidmode-dev x11proto-xinerama-dev
xorg-sgml-doctools xtrans-dev
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
cups cups-bsd cups-client cups-common cups-core-drivers cups-daemon
cups-server-common file libc-bin libc-dev-bin libc6 libc6-dev libcups2
libcupscgi1 libcupsimage2 libcupsmime1 libcupsppdc1 libexpat1-dev
libfreetype6-dev libpng12-dev locales zlib1g-dev
Suggested packages:
cups-pdf smbclient xpp glibc-doc
The following NEW packages will be installed:
cups file libc-bin libc-dev-bin libc6-dev libexpat1-dev libfreetype6-dev
libpng12-dev locales zlib1g-dev
The following packages will be upgraded:
cups-bsd cups-client cups-common cups-core-drivers cups-daemon
cups-server-common libc6 libcups2 libcupscgi1 libcupsimage2 libcupsmime1
libcupsppdc1
12 upgraded, 10 newly installed, 0 to remove and 349 not upgraded.
3 not fully installed or removed.
Need to get 0 B/11.6 MB of archives.
After this operation, 38.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
debconf: Perl may be unconfigured (Can't locate Debconf/Log.pm in @INC (you may need to install the Debconf::Log module) (@INC contains: /usr/local/lib/perl5/site_perl/5.28.1/x86_64-linux /usr/local/lib/perl5/site_perl/5.28.1 /usr/local/lib/perl5/5.28.1/x86_64-linux /usr/local/lib/perl5/5.28.1) at (eval 1) line 4.
BEGIN failed--compilation aborted at (eval 1) line 4.
) -- aborting
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)
答案1
好的,我没有遇到这种问题,但是我发现了一些有用的说明来解决问题perl
:
首先,确保这是否能解决你的问题:
sudo dpkg --configure -a
如果不起作用,请执行以下步骤:
1)在某个目录中创建一个文件:
gedit perl-fix.sh
2)复制内容:
#!/bin/bash
# change INC to have Ubuntu's deb/apt calls to custom perl use
# old perl's deb perl stuff
custom=$( env -i perl -V |\
sed -n -e '/^ *@INC/,${/usr\/local\/lib\/perl5\/5.*[0-9]$/p}' )
echo Custom perl is in $custom
pushd /usr/share/perl5 > /dev/null
for f in $( echo * )
do ls ${custom}/$f 2>/dev/null ||\
sudo ln -s /usr/share/perl5/$f ${custom}/$f
echo File or dir here\: $f
done
# not sure if we need to also do for /usr/local/lib/perl5/[older perl] stuff
popd > /dev/null
3)保存并退出
4)运行:
sh perl-fix.sh
如果出现问题,请随时发表评论。 来源