ModuleNotFoundError--No-module-named-'apt_pkg'-Error Resolution
Preface Encountered this issue today while installing Docker. Solved it by searching for solutions, so I'm documenting it here. I suspect the cause is that I upgraded the system's Python version today and then changed the python3 soft link to point to the latest version. Solution sudo apt-get remove --purge python-apt sudo apt-get install python-apt -f cd /usr/lib/python3/dist
目录3 个章节
Preface
Today, I encountered this issue while installing Docker and resolved it by searching for solutions, so I'm documenting it here. I suspect the cause is that I upgraded the system's Python version today, and then I also changed the python3 symlink to point to the latest version.
Solution
sudo apt-get remove --purge python-apt
sudo apt-get install python-apt -f
cd /usr/lib/python3/dist-packages/
sudo cp apt_pkg.cpython-3?m-x86_64-linux-gnu.so apt_pkg.cpython-36m-x86_64-linux-gnu.so
Reference Materials
_EOF_
ModuleNotFoundError--No-module-named-'apt_pkg'-Error Resolution
- 本文作者:
- 程序设计实验室
- 版权声明:
- 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
相关文章
Linux下查看dd命令写入进度
前言 Linux下有一个强力工具,dd,用来操作镜像,简直神器,唯一的不足是没有显示操作进度,不过也不是没有办法,下面介绍几个查看写入进度的方法。 status选项查看进度 如果你使用的是GNU版本的dd,并且coreutils版本高于8.24,那么可以使用status选项。例如: sudo dd if=/dev/sda of=/dev/zero status=progress 上面命令在Mac
2025-10-27 · FAQ & Tips · 约 1 分钟
轻松解决Linux+Windows双系统时间不一致问题
前言 Linux用户很多都是使用双系统的吧,毕竟很多Linux下没有的软件还是需要打开Windows。 但是一直以来有个困扰,Linux下时间显示是正常的,但是回到Windows下时间就会慢了8个小时 = = 这是因为Windows默认使用硬件时钟,而Linux使用网络时间,现在只需要一条命令就能搞定这个问题。 解决 在Linux下打开终端,输入命令: timedatectl set-local-
2025-10-27 · FAQ & Tips · 约 1 分钟
某些软件中无法切换fcitx输入法的问题
gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gtk/IMModule':<'fcitx'>}"
2025-10-27 · FAQ & Tips · 约 1 分钟
How-to-change-mouse-cursor-and-theme-
In order to get your custom cursor to work with all applications do: Download a cursor theme. Extract it to /usr/share/icons or ~/.local/share/icons Open Gnome Tweak Tool and change the cursor theme.
2025-10-27 · FAQ & Tips · 约 1 分钟
讨论
共 0 条加载评论中…