在kali linux中安装python3和pip3时出错

问题描述 投票:0回答:1

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

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的requests包

python-3.3
1个回答
0
投票
  1. tar -xvf python-3.3.0.tgz

  2. cd python-3.3.0

  3. ./配置

  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”中

现在可以正常工作了

© www.soinside.com 2019 - 2024. All rights reserved.