安装lib64stdc++6:i386包报错,Ubuntu16.04下AVD模拟器依赖问题求解
Hey there, let's work through this frustrating dependency problem you're hitting while setting up your AVD emulator. The error chain with lib64stdc++6:i386, lib64gcc1:i386, and libc6-amd64:i386 is common on Ubuntu 16.04 due to multi-architecture dependency quirks—here's how to resolve it step by step:
Step 1: Verify Multi-Architecture Support
First, make sure your system properly supports the i386 architecture (even though you have libc6:i386 installed, sometimes the configuration can be off):
- Run this command to check enabled foreign architectures:
dpkg --print-foreign-architectures - If
i386isn't listed, add it with:sudo dpkg --add-architecture i386 sudo apt-get update
Step 2: Fix Broken Dependencies Automatically
The most likely fix is to let apt repair any broken dependency chains on its own:
sudo apt-get -f install
This command scans for unmet dependencies and tries to resolve them—often it'll sort out the libc6-amd64:i386 issue without manual intervention.
Step 3: Manually Install the Correct libc6-amd64:i386 Version (If Step 2 Fails)
If the automatic fix doesn't work, you might need to specify the exact version of libc6-amd64:i386 that matches your system's libc6 version:
- List available versions for the package:
apt-cache show libc6-amd64:i386 - Install the version that matches your installed
libc6(you can check yourlibc6version withdpkg -l libc6):
Note: Replace the version number with the one you saw in thesudo apt-get install libc6-amd64:i386=2.23-0ubuntu11apt-cacheoutput.
Step 4: Install the Required Emulator Libraries
Once the libc6-amd64:i386 dependency is satisfied, install the original libraries you needed:
sudo apt-get install lib64gcc1:i386 lib64stdc++6:i386
Step 5: Fallback: Install Full 32-Bit Library Support
If you're still running into issues, install the full multilib packages to cover all 32-bit dependencies the emulator might need:
sudo apt-get install gcc-multilib g++-multilib
This package bundle includes most common 32-bit libraries and should resolve any remaining gaps.
After completing these steps, you should be able to launch your AVD emulator without dependency errors.
内容的提问来源于stack exchange,提问作者user8817816

