dpkg fails while setting up android-studio
This is on Ubunu 15.04, 64 bit:
$ sudo apt-get install android-studio
[...]
Setting up android-studio (4.8.3-ubuntu0) ...
unzip: cannot find or open /opt/android-studio-ide-*, /opt/android-studio-ide-*.zip or /opt/android-studio-ide-*.ZIP.
No zipfiles found.
rm: cannot remove ‘/opt/android-studio-ide-*’: No such file or directory
find: `/opt/android-studio/': No such file or directory
find: `/opt/android-studio/': No such file or directory
dpkg: error processing package android-studio (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
android-studio
It seems that /opt/android-studio/ doesn't exists... Try to run:
sudo mkdir /opt/android-studio/
This should fix the issue.
sudo apt-get purge android-studio; sudo apt-get install android studio.... this should fix your problem...
I got a similar error when installing on a brand new Ubuntu 14.04 Digital Ocean server. To work around the error I ran similar to what @PaoloRotolo said: sudo /opt
This has allowed sudo apt-get install android-studio to finish without error (though I haven't yet confirmed it runs).
Seems like some distros don't come with a /opt folder, and the post-install scripts in the ppa expects the folder to exists.