I tried to install Android studio through terminal. I added the repository:

sudo apt-add-repository ppa:paolorotolo/adroid-studio

Then I typed sudo apt-get install android-studio

and it started downloading. Then while it was downloading I reboot my computer accidentally and when I did the same procedure the system notified me about the interruption and guided to give the command:

sudo dpkg --configure -a

So I did and the installation continued. Now I get the error:

Setting up android-studio (4.2-0ubuntu0) ...
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
E: Sub-process /usr/bin/dpkg returned an error code (1)

HOow can I fix this?

share|improve this question
up vote 4 down vote accepted

Just because the package manager continues following an interrupt doesn't mean that the package itself will not contain errors.

Try removing the package and starting the process over again.

First purge the package:

sudo apt-get purge android-studio

Then fix any remaining issues (sudo dpkg --configure -a or sudo apt-get update) and run the installation again (sudo apt-get install android-studio).

share|improve this answer
    
I tried this solution but still getting the same error. – Lnux Feb 27 '16 at 7:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.