2017-07-30 132 views
0

安装python3和PIP3我必须使用在安装时下列命令:错误而在卡利的Linux

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

错误:

[email protected]:~/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 '这个命令。 它给出以下错误:

[email protected]:~/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
  1. 焦油-xvf中的python-3.3.0.tgz

  2. CD中的python-3.3.0

  3. 的./configure

  4. make

  5. sudo make altinstall

下一个: 从URL下载get-pip.py表单。 https://bootstrap.pypa.io/get-pip.py

  1. 将此安装为'py'文件。转到Linux终端类型

根#蟒蛇get-pip.py

假设下载的文件位于“根”

现在将正常工作