【问题标题】:Error while installing python3 and pip3 in kali linux在kali linux中安装python3和pip3时出错
【发布时间】:2017-07-30 09:38:50
【问题描述】:

我在安装时使用了以下命令:

tar -xvf python-3.3.0.tgz
cd python-3.3.0
./configure
make
sudo make altinstall
sudo apt-get install python3-pip

错误:

root@kali:~/Desktop/Python-3.3.0# sudo apt-get install python3-pip
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:
 libc-bin : Depends: libc6 (< 2.20) but 2.21-0ubuntu4 is to be installed
 libc6-dbg : Depends: libc6 (= 2.19-18) but 2.21-0ubuntu4 is to be installed
 python3-pip : Depends: python3-colorama but it is not going to be installed
               Depends: python3-distlib but it is not going to be installed
               Depends: python3-html5lib but it is not going to be installed
               Depends: python3-requests but it is not going to be installed
               Depends: python3-setuptools but it is not going to be installed
               Recommends: python3-dev (>= 3.2) but it is not going to be installed
               Recommends: python3-wheel but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

我已经尝试过 'apt-get -f install' 这个命令。 它给出了以下错误:

root@kali:~/Desktop/Python-3.3.0# apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  libc-bin libc6-dbg
The following packages will be upgraded:
  libc-bin libc6-dbg
2 upgraded, 0 newly installed, 0 to remove and 1464 not upgraded.
3 not fully installed or removed.
Need to get 0 B/4,322 kB of archives.
After this operation, 2,792 kB disk space will be freed.
Do you want to continue? [Y/n] Y
WARNING: The following packages cannot be authenticated!
  libc-bin libc6-dbg
Install these packages without verification? [y/N] y
Reading changelogs... Done
(Reading database ... 323301 files and directories currently installed.)
Preparing to unpack .../libc-bin_2.21-0ubuntu4_amd64.deb ...
Unpacking libc-bin (2.21-0ubuntu4) over (2.19-18) ...
dpkg: error processing archive /var/cache/apt/archives/libc-bin_2.21-0ubuntu4_amd64.deb (--unpack):
 trying to overwrite '/usr/sbin/update-locale', which is also in package locales 2.19-18
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libc-bin_2.21-0ubuntu4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

如何解决这个错误? 以及如何为python3安装请求包

【问题讨论】:

    标签: python-3.3


    【解决方案1】:
    1. tar -xvf python-3.3.0.tgz

    2. cd python-3.3.0

    3. ./configure

    4. 制作

    5. sudo make altinstall

    下一步: 在 URL 下方下载 get-pip.py 表单。 https://bootstrap.pypa.io/get-pip.py

    1. 将此安装为“py”文件。转到 Linux 终端输入

    root# python get-pip.py

    假设下载的文件位于'root'

    现在可以正常使用了

    【讨论】:

      猜你喜欢
      • 2021-08-19
      • 2022-11-22
      • 2020-07-30
      • 2022-01-18
      • 1970-01-01
      • 2017-03-11
      • 1970-01-01
      • 2018-07-18
      • 1970-01-01
      相关资源
      最近更新 更多