版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u014221090/article/details/82657401 </div>
<link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/ck_htmledit_views-f57960eb32.css">
<div id="content_views" class="markdown_views">
<!-- flowchart 箭头图标 勿删 -->
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<path stroke-linecap="round" d="M5,0 0,2.5 5,5z" id="raphael-marker-block" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path>
</svg>
<h3 id="原因"><a name="t0"></a>原因</h3>
升级到python3.6会导致python库的引用产生混乱
解决方法
- 先选择删除python-apt
apt-get remove --purge python-apt
- 1
- 安装python-apt
apt-get install -f -y python-apt
- 1
- 拷贝python3.5的apt-pkg*.so 名重名为python3.6的apt-pkg*.so
cd /usr/lib/python3/dist-packages/
cp apt_pkg.cpython-35m-x86_64-linux-gnu.so apt_pkg.cpython-36m-x86_64-linux-gnu.so
- 1
- 2
<link href="https://csdnimg.cn/release/phoenix/mdeditor/markdown_views-258a4616f7.css" rel="stylesheet">
</div>