【Ubuntu升级python3.5到python3.6】dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing: E: Sub-process /usr/bin/dpkg returned an error code (1) 问题解决
Ubuntu16.04上将系统自带的python3.5升级到3.6
安装aioredis时提示Python版本需>=3.5.3,所以进行升级
命令如下:
$ sudo add-apt-repository ppa:jonathonf/python-3.6
$ sudo apt-get update
$ sudo apt-get install python3.*
注意,安装python3.6的时候一定要加*,将3.6所需的依赖库也一起装上
注意,python3.5不要卸载,卸载会损坏系统。
# 移除原3.4link
$ sudo rm /usr/bin/python3 # 更换默认python3 的版本为3.
$ sudo ln -s /usr/bin/python3. /usr/bin/python3
安装完Python后pip需重新安装:
$ wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate
$ sudo python get-pip.py
问题解决
参考:https://askubuntu.com/questions/1037528/apt-get-upgrade-error-for-python-packages-in-ubuntu-16-04
在ubuntu上将python3.5升级到python3.6,执行如下命令时,遇到错误:
sudo apt-get install python3.*
Building dependency tree
Reading state information... Done
Note, selecting 'python3.6-2to3' for glob 'python3.6*'
Note, selecting 'python3.6-venv' for glob 'python3.6*'
Note, selecting 'python3.6-examples' for glob 'python3.6*'
Note, selecting 'python3.6' for glob 'python3.6*'
Note, selecting 'python3.6-tk' for glob 'python3.6*'
Note, selecting 'python3.6-lib2to3' for glob 'python3.6*'
Note, selecting 'python3.6-minimal' for glob 'python3.6*'
Note, selecting 'python3.6-gdbm' for glob 'python3.6*'
Note, selecting 'python3.6-dbg' for glob 'python3.6*'
Note, selecting 'python3.6-dev' for glob 'python3.6*'
Note, selecting 'python3.6-doc' for glob 'python3.6*'
Note, selecting 'python3.6-distutils' for glob 'python3.6*'
Note, selecting 'python3-tk' instead of 'python3.6-tk'
Note, selecting 'python3-distutils' instead of 'python3.6-distutils'
Note, selecting 'python3-gdbm' instead of 'python3.6-gdbm'
Note, selecting 'python3-lib2to3' instead of 'python3.6-lib2to3'
python3-gdbm is already the newest version (3.6.5-3~16.04.york4).
python3-tk is already the newest version (3.6.5-3~16.04.york4).
python3.6 is already the newest version (3.6.8-1~16.04.york1).
python3.6-dbg is already the newest version (3.6.8-1~16.04.york1).
python3.6-dev is already the newest version (3.6.8-1~16.04.york1).
python3.6-doc is already the newest version (3.6.8-1~16.04.york1).
python3.6-examples is already the newest version (3.6.8-1~16.04.york1).
python3.6-minimal is already the newest version (3.6.8-1~16.04.york1).
python3.6-venv is already the newest version (3.6.8-1~16.04.york1).
The following NEW packages will be installed:
python3-distutils python3-lib2to3
0 upgraded, 2 newly installed, 0 to remove and 261 not upgraded.
Need to get 0 B/219 kB of archives.
After this operation, 1,090 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 292643 files and directories currently installed.)
Preparing to unpack .../python3-lib2to3_3.6.5-3~16.04.york0.2_all.deb ...
Unpacking python3-lib2to3 (3.6.5-3~16.04.york0.2) ...
dpkg: error processing archive /var/cache/apt/archives/python3-lib2to3_3.6.5-3~16.04.york0.2_all.deb (--unpack):
trying to overwrite '/usr/lib/python3.6/lib2to3/Grammar.txt', which is also in package libpython3.6-stdlib:amd64 3.6.8-1~16.04.york1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to unpack .../python3-distutils_3.6.5-3~16.04.york0.2_all.deb ...
Unpacking python3-distutils (3.6.5-3~16.04.york0.2) ...
dpkg: error processing archive /var/cache/apt/archives/python3-distutils_3.6.5-3~16.04.york0.2_all.deb (--unpack):
trying to overwrite '/usr/lib/python3.6/distutils/dir_util.py', which is also in package libpython3.6-stdlib:amd64 3.6.8-1~16.04.york1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/python3-lib2to3_3.6.5-3~16.04.york0.2_all.deb
/var/cache/apt/archives/python3-distutils_3.6.5-3~16.04.york0.2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
对于这种错误,我采取的处理方法是手动强行安装两个安装失败的包(黄底色红字部分):
sudo dpkg --install --force all /var/cache/apt/archives/python3-lib2to3_3.6.5-~16.04.york0.2_all.deb
sudo dpkg --install --force all /var/cache/apt/archives/python3-distutils_3.6.5-~16.04.york0.2_all.deb
然后再执行
sudo apt install -f
然后安装就没问题了
sudo apt-get install python3.*
安装成功!
【Ubuntu升级python3.5到python3.6】dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing: E: Sub-process /usr/bin/dpkg returned an error code (1) 问题解决的更多相关文章
- E: Sub-process /usr/bin/dpkg returned an error code (1)
E: Sub-process /usr/bin/dpkg returned an error code (1) 错误描述 dpkg: error processing archive /var/cac ...
- [转]ubuntu错误解决E: Sub-process /usr/bin/dpkg returned an error code (1)
[转]ubuntu错误解决E: Sub-process /usr/bin/dpkg returned an error code (1) http://yanue.net/post-123.html ...
- E: Sub-process /usr/bin/dpkg returned an error code (1)错误解决
在用apt-get安装软件时出现了类似于install-info: No dir file specified; try --help for more information.dpkg:处理 get ...
- E: Sub-process /usr/bin/dpkg returned an error code
E: Sub-process /usr/bin/dpkg returned an error code (1)错误解决 在用apt-get安装软件时出现了类似于install-info: No dir ...
- ubuntu/debian安装mysql遇到的问题及解决方法_1.dpkg中mysql-server-5.5 (configure)时出错 mysql-server-5.5 E: Sub-process /usr/bin/dpkg returned an error code (1)
我的debian7之前安装了mysql-server,是通过apt安装的,后来我卸载掉, 然后用whereis mysql查找, 把所有关于mysql的目录删除掉,包括带mysqld的目录及文件. 重 ...
- Sub-process /usr/bin/dpkg returned an error code (1)解决方法
在ubuntu下使用apt-get install 安装资源的时候,总是会遇到Sub-process /usr/bin/dpkg returned an error code (1) 错了, 跟安装软 ...
- ubuntu 下出现E: Sub-process /usr/bin/dpkg returned an error code
在用apt-get安装软件时出现了类似于 install-info: No dir file specified; try –help for more information.dpkg:处理 get ...
- 【转】E: Sub-process /usr/bin/dpkg returned an error code (1)
原链接: jaryWang:E: Sub-process /usr/bin/dpkg returned an error code (1)错误解决 1.$ sudo mv /var/lib/dpkg/ ...
- 解决Ubuntu sudo apt-get install遇到的E: Sub-process /usr/bin/dpkg returned an error code (1)问题
如题,本人在安装samba等软件的时候,在命令行敲入: sudo apt-get install samba4命令的时候,系统在下载之后报错,大致内容如下: ~$ sudo apt-get insta ...
随机推荐
- 利用mysql的inet_aton()和inet_ntoa()函数存储IP地址的方法
原文:https://www.jb51.net/article/29962.htm 当前很多应用都适用字符串char(15)来存储IP地址(占用16个字节),利用inet_aton()和inet_nt ...
- Java.io.tmpdir介绍
System.getproperty(“java.io.tmpdir”)是获取操作系统缓存的临时目录,不同操作系统的缓存临时目录不一样, 在Windows的缓存目录为:C:\Users\登录用户~1\ ...
- 使用CefSharp在C#访问网站,支持x86和x64
早已久仰CefSharp大名,今日才得以实践,我其实想用CefSharp来访问网站页面,然后抓取html源代码进行分析,如果使用自带的WebBrowser控件,可能会出现一些不兼容js的错误. Cef ...
- Python基础初始之二
1.格式化的输出 当你遇到这样的需要:字符串中想让某些位置变成动态可传入的,首先考虑用格式化输出 1.格式化输出:% 2. 格式化输出:format 3. 格式化输出:f 2.运算符 3.编码 待续
- hexo与github page搭建博客
安装 npm i hexo-cli -g hexo init blog cd blog npm install hexo server 发布hexo到github page npm i hexo-de ...
- janusgraph-mgmt中的一些操作
关闭事务 mgmt = graph.openManagement(); ids = mgmt.getOpenInstances(); for(String id : ids){if(!id.conta ...
- LeetCode 731. My Calendar II
原题链接在这里:https://leetcode.com/problems/my-calendar-ii/ 题目: Implement a MyCalendarTwo class to store y ...
- LeetCode 1105. Filling Bookcase Shelves
原题链接在这里:https://leetcode.com/problems/filling-bookcase-shelves/ 题目: We have a sequence of books: the ...
- C++中继承 声明基类析构函数为虚函数作用,单继承和多继承关系的内存分布
1,基类析构函数不为虚函数 #include "pch.h" #include <iostream> class CBase { public: CBase() { m ...
- [PA2012]Dwa torty
[PA2012]Dwa torty 题目大意: 给定两个排列\(A_{1\sim n},B_{1\sim n}\),你需要将两个排列用最少的次数消除. 消除只能从头消除,一次消除可以从两个排列的头部取 ...