无法在12.04 64位上运行“dpkg –add-architecture i386”来运行eclipse ADT

运行ubuntu 12.04 64位。 我正在尝试按照标题:安装Android SDK compat库下的本页末尾所写的步骤进行操作。 我这样做是为了解决这个问题。 但是当我运行第一个命令时

sudo dpkg --add-architecture i386 

它失败并提供以下输出:

 pkg: error: unknown option --add-architecture Type dpkg --help for help about installing and deinstalling packages [*]; Use `dselect' or `aptitude' for user-friendly package management; Type dpkg -Dhelp for a list of dpkg debug flag values; Type dpkg --force-help for a list of forcing options; Type dpkg-deb --help for help about manipulating *.deb files; Options marked [*] produce a lot of output - pipe it through `less' or `more' ! 

如何成功运行此命令?
输出dpkg --help

 Usage: dpkg [ ...]  Commands: -i|--install  ... | -R|--recursive  ... --unpack  ... | -R|--recursive  ... -A|--record-avail  ... | -R|--recursive  ... --configure  ... | -a|--pending --triggers-only  ... | -a|--pending -r|--remove  ... | -a|--pending -P|--purge  ... | -a|--pending --get-selections [ ...] Get list of selections to stdout. --set-selections Set package selections from stdin. --clear-selections Deselect every non-essential package. --update-avail  Replace available packages info. --merge-avail  Merge with info from file. --clear-avail Erase existing available info. --forget-old-unavail Forget uninstalled unavailable pkgs. -s|--status  ... Display package status details. -p|--print-avail  ... Display available version details. -L|--listfiles  ... List files `owned' by package(s). -l|--list [ ...] List packages concisely. -S|--search  ... Find package(s) owning file(s). -C|--audit Check for broken package(s). --print-architecture Print dpkg architecture. --compare-versions    Compare version numbers - see below. --force-help Show help on forcing. -Dh|--debug=help Show help on debugging. -h|--help Show this help message. --version Show the version. Use dpkg -b|--build|-c|--contents|-e|--control|-I|--info|-f|--field| -x|--extract|-X|--vextract|--fsys-tarfile on archives (type dpkg-deb --help). For internal use: dpkg --assert-support-predepends | --predep-package | --assert-working-epoch | --assert-long-filenames | --assert-multi-conrep | --assert-multi-arch. Options: --admindir= Use  instead of /var/lib/dpkg. --root= Install on a different root directory. --instdir= Change installation dir without changing admin dir. --path-exclude= Do not install paths which match a shell pattern. --path-include= Re-include a pattern after a previous exclusion. -O|--selected-only Skip packages not selected for install/upgrade. -E|--skip-same-version Skip packages whose same version is installed. -G|--refuse-downgrade Skip packages with earlier version than installed. -B|--auto-deconfigure Install even if it would break some other package. --[no-]triggers Skip or force consequential trigger processing. --no-debsig Do not try to verify package signatures. --no-act|--dry-run|--simulate Just say what we would do - don't do it. -D|--debug= Enable debugging (see -Dhelp or --debug=help). --status-fd  Send status change updates to file descriptor . --log= Log status changes and actions to . --ignore-depends=,... Ignore dependencies involving . --force-... Override problems (see --force-help). --no-force-...|--refuse-... Stop when problems encountered. --abort-after  Abort after encountering  errors. Comparison operators for --compare-versions are: lt le eq ne ge gt (treat empty version as earlier than any version); lt-nl le-nl ge-nl gt-nl (treat empty version as later than any version); < << = >> > (only for compatibility with control file syntax). Use `dselect' or `aptitude' for user-friendly package management. 

输出dpkg --force-help

  dpkg forcing options - control behaviour when problems found: warn but continue: --force-,,... stop with error: --refuse-,,... | --no-force-,... Forcing things: [!] all Set all force options [*] downgrade Replace a package with a lower version configure-any Configure any package which may help this one hold Process incidental packages even when on hold not-root Try to (de)install things even when not root bad-path PATH is missing important programs, problems likely bad-verify Install a package even if it fails authenticity check bad-version Process even packages with wrong versions overwrite Overwrite a file from one package with another overwrite-diverted Overwrite a diverted file with an undiverted version [!] overwrite-dir Overwrite one package's directory with another's file [!] unsafe-io Do not perform safe I/O operations when unpacking [!] confnew Always use the new config files, don't prompt [!] confold Always use the old config files, don't prompt [!] confdef Use the default option for new config files if one is available, don't prompt. If no default can be found, you will be prompted unless one of the confold or confnew options is also given [!] confmiss Always install missing config files [!] confask Offer to replace config files with no new versions [!] architecture Process even packages with wrong or no architecture [!] breaks Install even if it would break another package [!] conflicts Allow installation of conflicting packages [!] depends Turn all dependency problems into warnings [!] depends-version Turn dependency version problems into warnings [!] remove-reinstreq Remove packages which require installation [!] remove-essential Remove an essential package WARNING - use of options marked [!] can seriously damage your installation. Forcing options marked [*] are enabled by default. 

确保/etc/dpkg/dpkg.cfg.d/中存在的唯一文件是“multiarch”

 ls /etc/dpkg/dpkg.cfg.d/ 

如果输出是

 multiarch 

执行以下命令,因为它将“multiarch”替换为该目录中存在的文件名。

 sudo sh -c "echo 'foreign-architecture i386' > /etc/dpkg/dpkg.cfg.d/multiarch" 

上面的命令将添加i386架构。

12.04不完全是Multiarch。

要启动并运行android dev环境:

  sudo apt-get install ia32-libs openjdk-6-jdk:i386