我正在尝试安装" python-sklearn"当我尝试安装任何python包时,它需要很少的依赖项,它会显示类似这样的错误。我试过几个prevoius帖子建议的解决方案,但在我的情况下没有什么工作可以解决这个问题。
root@famous-breath:/home# sudo sudo apt-get install python-numpy
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-numpy is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 34 not upgraded.
3 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
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_IN"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up libblas3 (1.2.20110419-7) ...
update-alternatives: using /usr/lib/libblas/libblas.so.3 to provide /usr/lib/libblas.so.3 (libblas.so.3) in auto mode
update-alternatives: error: error creating symbolic link `/etc/alternatives/libblas.so.3.dpkg-tmp': No such file or directory
dpkg: error processing package libblas3 (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of liblapack3:
liblapack3 depends on libblas3 | libblas.so.3; however:
Package libblas3 is not configured yet.
Package libblas.so.3 is not installed.
Package libblas3 which provides libblas.so.3 is not configured yet.
dpkg: error processing package liblapack3 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-numpy:
python-numpy depends on libblas3 | libblas.so.3; however:
Package libblas3 is not configured yet.
Package libblas.so.3 is not installed.
Package libblas3 which provides libblas.so.3 is not configured yet.
python-numpy depends on liblapack3 | liblapack.so.3; however:
Package liblapack3 is not configured yet.
Package liblapack.so.3 is not installed.
Package liblapack3 which provides liblapack.so.3 is not configured yet.
dpkg: error processing package python-numpy (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libblas3
liblapack3
python-numpy
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@famous-breath:/home#
我尝试用apt卸载libblas3,liblapack3,但是当我添加新包时,它以错误代码1结束,列表将显示该包
示例:
Errors were encountered while processing:
libblas3
liblapack3
python-numpy
python-matplotlib
python-scipy
python-sklearn-lib
python-sklearn
请帮助我该如何解决这个问题..
答案 0 :(得分:0)
Errors were encountered while processing:
libblas3
nliblapack3
python-numpy
python-matplotlib
python-scipy
python-sklearn-lib
python-sklearn
试试这个代码snipet,它对我来说很好用!
sudo mv /var/lib/dpkg/info/libblas3.postinst /var/lib/dpkg/info/libblas3.postinst.backup
和
sudo mv /var/lib/dpkg/info/nliblapack3.postinst /var/lib/dpkg/info/nliblapack3.postinst.backup
对所有导致错误的模块执行相同操作。
尝试使用更新缓存后
sudo apt-get update
答案 1 :(得分:0)
就我而言,我遇到了python-faraday的问题。
Errors were encountered while processing:
faraday
python-faraday
所以我寻找了与之相关的文件:
ls -l /var/lib/dpkg/info | grep -i faraday
-rw-r--r-- 1 root root 57089 Jun 30 09:49 faraday.list
-rw-r--r-- 1 root root 65393 Jun 11 09:39 faraday.md5sum
-rwxr-xr-x 1 root root 1968 Jun 11 09:39 faraday.postinst
-rwxr-xr-x 1 root root 631 Jun 11 09:39 faraday.postrm`
-rwxr-xr-x 1 root root 592 Jun 11 09:39 faraday.prerm
-rw-r--r-- 1 root root 16980 Jun 30 09:45 python3-faraday-plugins.list
-rw-r--r-- 1 root root 17054 Jun 8 14:56 python3-faraday-plugins.md5sums
-rwxr-xr-x 1 root root 271 Jun 8 14:56 python3-faraday-plugins.postinst
-rwxr-xr-x 1 root root 420 Jun 8 14:56 python3-faraday-plugins.prerm
-rw-r--r-- 1 root root 334 Jun 30 13:38 python-faraday.list
-rw-r--r-- 1 root root 387 Jun 11 09:39 python-faraday.md5sums
现在我要做的就是删除这些文件:
sudo mv /var/lib/dpkg/info/polar-bookshelf.* /tmp
使用sudo apt更新,然后您应该能够照常安装软件。
答案 2 :(得分:-1)
可能您的语言环境设置不正确。尝试运行以下命令:
sudo locale-gen
然后运行
sudo dpkg --configure -a
sudo apt-get install -f
解决您的包裹问题。