I met this problem when doing sudo apt-get update
. My env is debian8, with python2.7 + 3.4(default) + 3.5.
The following code will only re-create a apt_pkg....so
file for python 3.5
sudo apt-get install python3-apt --reinstall
The following code solved my problem,
cd /usr/lib/python3/dist-packages sudo ln -s apt_pkg.cpython-{your-version-number}-x86_64-linux-gnu.so apt_pkg.so
Replace {your-version-number}
appropriately.
CAUTION, the following will create a symlink from apt_pkg37m to apt_pkg36m. make sure you are linking to the correct, or at least to an existing version by ll apt_pkg.cpython-*
, and see which one(s) you have installed.
sudo ln -s apt_pkg.cpython-{36m,37m}-x86_64-linux-gnu.so
So, obviously, python3-apt checks the highest python version, instead of the current python version in use.
Related Posts:
- Install tkinter for Python
- “E: Unable to locate package python-pip” on Ubuntu 18.04 [duplicate]
- subprocess.Popen(): OSError: [Errno 8] Exec format error in python?
- “E: Unable to locate package python-pip” on Ubuntu 18.04 [duplicate]
- mysql_config not found when installing mysqldb python interface
- Python subprocess.Popen “OSError: [Errno 12] Cannot allocate memory”
- What is difference between arm64 and armhf?
- Uncompress tar.gz file
- mysql_config not found when installing mysqldb python interface
- can’t remove python pip
- screen Cannot open your terminal ‘/dev/pts/0’ – please check
- How can I set the ‘backend’ in matplotlib in Python?
- Yum fails with – There are no enabled repos.
- How to make rpm auto install dependencies
- How do I update a Python package?
- How to install Android SDK on Ubuntu?
- Bash script prints “Command Not Found” on empty lines
- Anyone else experiencing high rates of Linux server crashes during a leap second day?
- How can I run Debian stable but install some packages from testing?
- What’s the best way of handling permissions for Apache 2’s user www-data in /var/www?
- List of files installed from apt package
- How to install/change locale on Debian?
- How can I export the privileges from MySQL and then import to a new server?
- Should I install Linux applications in /var or /opt?
- Is it possible to reboot a Linux OS without rebooting the hardware?
- What does “debconf: delaying package configuration, since apt-utils is not installed” mean?
- What should I do when I got the KEYEXPIRED error message after an apt-get update?
- What is the debian-sys-maint MySQL user (and more)?
- How should an IT department choose a standard Linux distribution?
- How do I deal with a filename that starts with the hyphen (-) character?
- pip not recognised as an internal or external command
- Chmod 777 to a folder and all contents [duplicate]
- How to completely remove Python from a Windows machine?
- Bash: No such file or directory?
- Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running?
- Confused about stdin, stdout and stderr?
- “pip install unroll”: “python setup.py egg_info” failed with error code 1
- Tensorflow import error: No module named ‘tensorflow’
- What’s a .sh file?
- Amazon Linux: apt-get: command not found
- How do I install pip on macOS or OS X?
- How to set the environmental variable LD_LIBRARY_PATH in linux
- How do I install pip on macOS or OS X?
- How can I install pip on Windows?
- “pip install unroll”: “python setup.py egg_info” failed with error code 1
- ImportError: No module named tensorflow
- What’s a .sh file?
- How can I symlink a file in Linux? [closed]
- How to fix ‘sudo: no tty present and no askpass program specified’ error?
- Kill detached screen session [closed]
- How do I grep recursively?
- How do I grep recursively?
- Why do you need to put #!/bin/bash at the beginning of a script file?
- How to get the url of the current svn repo?
- What does pss mean in /proc/pid/smaps
- apt-get error: Sub-process /usr/bin/dpkg returned an error code (1)
- How do I find all files containing specific text on Linux?
- How to unmount a busy device
- “Couldn’t find a file descriptor referring to the console” on Ubuntu bash on Windows
- How to unmount a busy device
- “Defaulting to user installation because normal site-packages is not writeable” python message
- error: ‘Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)’ — Missing /var/run/mysqld/mysqld.sock
- performing HTTP requests with cURL (using PROXY)
- Python3: ImportError: No module named ‘_ctypes’ when using Value from module multiprocessing
- Where can I find php.ini?
- gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now
- error: ‘Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)’ — Missing /var/run/mysqld/mysqld.sock
- No space left on device
- How do I grep recursively?
- How can I recursively find all files in current and subfolders based on wildcard matching?
- How to perform grep operation on all files in a directory?
- How to upgrade pip3?
- Amazon Linux: apt-get: command not found
- How to install grub after installing Windows 10
- Linux: ‘Username’ is not in the sudoers file. This incident will be reported
- how to find libstdc++.so.6: that contain GLIBCXX_3.4.19 for RHEL 6?
- How to extract C source code from .so file?
- Pass a password to ssh in pure bash
- How to substitute shell variables in complex text files
- How to upgrade pip3?
- -bash: syntax error near unexpected token `newline’ for display command
- How can I recursively find all files in current and subfolders based on wildcard matching?
- How do I use grep to search the current directory for all files having the a string “hello” yet display only .h and .cc files?
- Python virtualenv questions
- SSH using python script
- Curl command for https ( SSL )
- How to activate virtualenv in Linux?
- How can I exclude directories from grep -R?
- How to exclude a directory in find . command
- “sed” command in bash
- How can I exclude directories from grep -R?
- Changing the resolution of a VNC session in linux
- gcc: error: unrecognized command line option
- How to exclude a directory in find . command
- How can I find all *.js file in directory recursively in Linux?
- Linux error while loading shared libraries: cannot open shared object file: No such file or directory
- How to set proxy for wget?
- Shell command to tar directory excluding certain files/folders
- Argument list too long error for rm, cp, mv commands
- QEMU: /bin/sh: can’t access tty; job control turned off