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?
- Amazon Linux: apt-get: command not found
- How do I find all files containing specific text on Linux?
- Where can I find php.ini?
- gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now
- How can I recursively find all files in current and subfolders based on wildcard matching?
- How to install grub after installing Windows 10
- Linux: ‘Username’ is not in the sudoers file. This incident will be reported
- How to upgrade pip3?
- How can I exclude directories from grep -R?
- How to exclude a directory in find . command
- Explaining the ‘find -mtime’ command
- Meaning of exit status 1 returned by linux command
- using pip3: module “importlib._bootstrap” has no attribute “SourceFileLoader”
- Creating a new directory in C
- mv: cannot stat error : No such file or directory error
- Linux error while loading shared libraries: cannot open shared object file: No such file or directory
- Pseudo-terminal will not be allocated because stdin is not a terminal
- linux command to get size of files and directories present in a particular folder?
- TCP congestion control version: HTCP module vs highspeed module in linux kernel
- How to use regex with find command?
- What is the difference between /etc/rc.local and ~/.bashrc?
- Snort Message – WARNING: No preprocessors configured for policy 0
- Unable to establish SSL connection upon wget on Ubuntu 14.04 LTS
- Getting stty: standard input: Inappropriate ioctl for device when using scp through an ssh tunnel
- How do I install chkconfig on Ubuntu?
- Apache server keeps crashing, “caught SIGTERM, shutting down”
- List all mounts in Linux
- How to use sed to extract substring
- Wait for user input in C?
- Difference between exec, execvp, execl, execv?
- Restarting cron after changing crontab file?
- tar: Error is not recoverable: exiting now
- How do I know the script file name in a Bash script?
- WordPress can’t find temporary folder, but folder it’s looking at has correct permissions
- WordPress cloning issue
- Can scp copy directories recursively?
- What are the functional differences between .profile .bash_profile and .bashrc
- Why does my hostname appear with the address 127.0.1.1 rather than 127.0.0.1 in /etc/hosts?
- Linux command to inspect TXT records of a domain [closed]
- df in linux not showing correct free space after file removal
- Setting the hostname: FQDN or short name?
- When does /tmp get cleared?
- What does a + mean at the end of the permissions from ls -l?
- How do I sleep for a millisecond in bash or ksh
- What does ‘set -e’ do, and why might it be considered dangerous?
- What version of RHEL am I using?
- What useful things can one add to one’s .bashrc? [closed]
- How do you make it obvious you are on a production system?
- How to add a timestamp to bash script log?
- How can I verify if TLS 1.2 is supported on a remote web server from the RHEL/CentOS shell?
- How to remove empty/blank lines from a file in Unix (including spaces)?
- Mount CIFS Host is down
- How can I kill all stopped jobs?
- How to copy a large number of files quickly between two servers
- How to copy file preserving directory path in Linux?
- Postfix – how to retry delivery of mail in queue?
- Allow SFTP but disallow SSH?
- Is it possible to alias a hostname in Linux?
- How do I list loaded Linux module parameter values?
- Does getting disconnected from an SSH session kill your programs?
- Tips for Securing a LAMP Server
- Is there a directory equivalent of /dev/null in Linux?
- Can I send some text to the STDIN of an active process running in a screen session?
- How can I get processor/RAM/disk specs from the Linux command Line? [duplicate]
- Is there a way to see the execution tree of systemd?
- How to determine the hostname from an IP address in a Windows network?
- create home directories after create users
- How do I redirect subdomains to a different port on the same server?
- Running Cron every 2 hours [duplicate]
- How to check the physical status of an ethernet port in Linux?
- In Linux, what is the difference between “buffers” and “cache” reported by the free command?