我在安装时使用了以下命令:
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).
我已经尝试过&#39; apt-get -f install&#39;这个命令。 它给出了以下错误:
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的请求包
答案 0 :(得分:0)
tar -xvf python-3.3.0.tgz
cd python-3.3.0
./配置
请
sudo make altinstall
下一步: 从URL下载get-pip.py表单。 https://bootstrap.pypa.io/get-pip.py
root #python get-pip.py
假设下载的文件位于&#39; root&#39;
现在它可以正常工作