If bump into errors similar to the following during apt install
Preparing to unpack .../libllvm3.8v4_1%3a3.8-2ubuntu3~trusty4_i386.deb ...
Unpacking libllvm3.8v4:i386 (1:3.8-2ubuntu3~trusty4) ...
dpkg: error processing archive /var/cache/apt/archives/libllvm3.8v4_1%3a3.8-2ubuntu3~trusty4_i386.deb (--unpack):
trying to overwrite '/usr/lib/i386-linux-gnu/libLLVM-3.8.so.1', which is also in package libllvm3.8:i386 1:3.8~+rc3-1~exp1~gd~t
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libllvm3.8v4_1%3a3.8-2ubuntu3~trusty4_i386.deb
do the following and run the apt install again.
sudo dpkg -i --force-overwrite /var/cache/apt/archives/libllvm3.8v4_1%3a3.8-2ubuntu3~trusty4_i386.deb
Long story short, apt
is the recommended way to install packages unless you need to use some extra (pretty low level) functions then use apt-get
On MacOS, one might encounter gem installation failure due to native extension build error.
Use the following snippet to fix the issue
export CXX=clang++
export GYPFLAGS=-Dmac_deployment_target=<xcode-version>
# to get xcode version
xcodebuild --version
# install the gem
gem install libv8