When I try to install a 32bit library apt-get install liblua5.2:i386 apt warns that is is going to uninstall a number of essential 64 bit packages. Some of them are being replaced with 32 bit versions but others will not be replaced.Aren't 32bit and 64bit packages supposed to be able to work side by side? The system is Ubuntu 14.04 64bit and essential packages like kde-plasma-desktop, kde-workspace, build-essential, gcc-4.8 etc, are slated for removal.Is that a fault in the design of the package and its dependents.The following packages will be REMOVED  build-essential cpp cpp-4.8 g++ g++-4.8 gcc gcc-4.8 gcc-4.8-multilib  gcc-multilib kde-plasma-desktop kde-workspace kde-workspace-bin libbonobo2-0  libbonoboui2-0 libgnome2-0 libgnome2-bin libgnome2-perl libgnomeui-0  libidl-common libidl0 liblua5.2-rrd-dev liblua5.2-rrd0 liborbit2 librrd4  libtool php5-dev shutter x11-apps x11-session-utils x11-xserver-utilsThe output in full:The following extra packages will be installed:  gcc-4.8-base gcc-4.8-base:i386 lib32asan0 lib32atomic1 lib32gcc-4.8-dev  lib32gomp1 lib32itm1 lib32quadmath0 libasan0 libatomic1 libc6-dev:i386  libdbi1:i386 libgcc-4.8-dev libgfortran3 libgomp1 libitm1 libquadmath0  libreadline-dev:i386 libreadline6-dev:i386 librrd4:i386 libstdc++-4.8-dev  libstdc++6 libstdc++6:i386 libtinfo-dev:i386 libtsan0 libx32asan0  libx32atomic1 libx32gcc-4.8-dev libx32gomp1 libx32itm1 libx32quadmath0  linux-libc-dev linux-libc-dev:i386Suggested packages:  glibc-doc:i386 manpages-dev:i386 libstdc++-4.8-docRecommended packages:  gcc:i386 c-compiler:i386 ttf-dejavu:i386 ttf-bitstream-vera:i386The following packages will be REMOVED  build-essential cpp cpp-4.8 g++ g++-4.8 gcc gcc-4.8 gcc-4.8-multilib  gcc-multilib kde-plasma-desktop kde-workspace kde-workspace-bin libbonobo2-0  libbonoboui2-0 libgnome2-0 libgnome2-bin libgnome2-perl libgnomeui-0  libidl-common libidl0 liblua5.2-rrd-dev liblua5.2-rrd0 liborbit2 librrd4  libtool php5-dev shutter x11-apps x11-session-utils x11-xserver-utilsThe following NEW packages will be installed  libc6-dev:i386 libdbi1:i386 liblua5.2-0:i386 liblua5.2-0-dbg:i386  liblua5.2-dev:i386 liblua5.2-rrd-dev:i386 liblua5.2-rrd0:i386  libreadline-dev:i386 libreadline6-dev:i386 librrd4:i386 libtinfo-dev:i386  linux-libc-dev:i386The following packages will be upgraded:  gcc-4.8-base gcc-4.8-base:i386 lib32asan0 lib32atomic1 lib32gcc-4.8-dev  lib32gomp1 lib32itm1 lib32quadmath0 libasan0 libatomic1 libgcc-4.8-dev  libgfortran3 libgomp1 libitm1 libquadmath0 libstdc++-4.8-dev libstdc++6  libstdc++6:i386 libtsan0 libx32asan0 libx32atomic1 libx32gcc-4.8-dev  libx32gomp1 libx32itm1 libx32quadmath0 linux-libc-dev26 to upgrade, 12 to newly install, 30 to remove and 316 not to upgrade.Need to get 12.1 MB of archives.After this operation, 73.3 MB disk space will be freed.Do you want to continue? [Y/n] 
Why is installing a 32bit package on a 64bit system warning about removing critical 64bit packages?
apt
Try apt-get install liblua5.2-0:i386 instead; there is no liblua5.2 package, so apt-get install liblua5.2:i386 is trying to install liblua5.2-dev:i386, liblua5.2-0-dbg:i386 and liblua5.2-0:i386. The -dev package is the one causing the removals.The search extension happens because the package name given contains a .; from apt-get's manual:If no package matches the given expression and the expression contains one of '.', '?' or '*' then it is assumed to be             a POSIX regular expression, and it is applied to all package names in the database. Any matches are then installed (or             removed). Note that matching is done by substring so 'lo.*' matches 'how-lo' and 'lowest'. If this is undesired, anchor             the regular expression with a '^' or '$' character, or create a more specific regular expression.So you could avoid this by runningapt-get install ^liblua5.2:i386$(which correctly fails). The rule is generalisable apparently; from what I've seen apt-get tries using the package name as a regex if it doesn't match a package name exactly, even if the expression doesn't contain ., ? or *.