This question already has answers here:
Error: Unable to run mksdcard SDK tool
(10 answers)
Closed 6 years ago.
I'm using Ubuntu Gnome 14.04, and I have Java 8 installed (both the JDK and the JRE).
When I was installing Android Studio everything worked, but a message appeared saying:
Unable to run mksdcard SDK tool
How can I install Android Studio correctly, or how do I fix this ?
Presuming that you are running the 64bit Ubuntu, the fix suggested for "Issue 82711" should solve your problem.
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
Update:
For Ubuntu 15.10 & 16.04
sudo apt-get install lib32z1 lib32ncurses5 lib32stdc++6
#warsong is right. Installing only lib32stdc++6 solved the problem.
For next uses I rewrite #warsongs comment in answer area.
sudo apt-get install lib32stdc++6
Update :
For Ubuntu 15.04,15.10,16.04 LTS & Debian 8
For Fedora (tested for Fedora 23/24) run
dnf install compat-libstdc++-296 compat-libstdc++-33 glibc libgcc nss-softokn-freebl libstdc++ ncurses-libs zlib-devel.i686 ncurses-devel.i686 ant
I understand the question is regarding UBUNTU, but I had similar problem in Debian Jessie 64bit and warsongs suggestion worked for it also.
When I ran studio.sh android studio would start, but when I tried to configure the android SDK I got the error
Unable to run mksdcard SDK tool
WHen I tried
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
Got error
E: Package 'lib32bz2-1.0' has no installation candidate
So took warsongs suggestion and only tried to install lib32stdc++6.
sudo apt-get install lib32stdc++6
After this was able to add the Android SDK into Android Studio.
Checkout this page
If you are running a 64-bit distribution on your development machine, you need to install additional packages first. For Ubuntu 13.10 (Saucy Salamander) and above, install the libncurses5:i386, libstdc++6:i386, and zlib1g:i386 packages using apt-get:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386
The Problem is caused by mksdcard not being installed correctly.
if you are running 64 bit, do this to fix the mksdcard problem.
sudo dpkg --add-architecture amd64
sudo apt-get update
sudo apt-get install libncurses5:amd64 libstdc++6:amd64 zlib1g:amd64
and 32 bit:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386
In SDK 6.0, the error message is different but means the same thing.
Unable to run mksdcard
None of these options worked for me on Ubuntu 12.10 (yeah, I need to upgrade). However, I found an easy solution. Download the source from here: https://github.com/miracle2k/android-platform_sdk/blob/master/emulator/mksdcard/mksdcard.c. Then simply compile with "gcc mksdcard.c -o mksdcard". Backup mksdcard in the SDK tools subfolder and replace with the newly compiled one. Android Studio will now be happy with your SDK.
For Linux Mint run
sudo apt-get install lib32z1 lib32ncurses5 libbz2-1.0 lib32stdc++6
If you run sudo apt-get install lib32z1 lib32ncurses5 libbz2-1.0 lib32stdc++6
and got a message like: "The following packages have unmet dependencies: lib32stdc++6 : Depends: lib32gcc1 (>= 1:4.1.1)".
You can do something like this tut: https://askubuntu.com/questions/671791/lib32stdc6-package-depends-on-gcc-base-but-my-installed-version-is-newer
This issue arises when your 64 bit os tries to install the Android SDK which in turns tries to install some 32 bit binaries and thus is the issue of compatibility.
Open an additional terminal and type
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
would help to install all the required binaries. After this, start the afresh the Android SDK installation process.
Related
I've tried to run vscode in java but the vs code is showing an error of (Not Pointing To JDK).
Is there is any way to run java programs in vs code in ubuntu.
Install java from here Install java from here Install java from here Install java from here Install java from here
https://code.visualstudio.com/docs/java/java-debugging#:~:text=You%20can%20manually%20install%20the,Code%20for%20the%20first%20time.
The simplest way is to run:
sudo apt-get install openjdk- and to press TAB several times for available options.
You will then choose a specific jdk.
Some examples:
sudo apt-get install openjdk-14-jdk
sudo apt-get install openjdk-13-jdk
sudo apt-get install openjdk-11-jdk
Afterwards you can restart VSCode.
I am trying to install java in my ubuntu software.Every time i am trying to install JRE or JDK it says:
~The following packages have unmet dependencies:
default-jre : Depends: default-jre-headless (= 1:1.6-43ubuntu2) but it is not going to be installed
Depends: openjdk-6-jre (>= 6b23~pre11-1ubuntu1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
and basically anything i try to do is stopped from some broken packages.I tried some cleaning techniques of apt and stuff but nothing helped also.Thank you in advance.
You can try apt-get install -f, which should try to resolve the conflict.
If it does, and there are no more conflicts, then you can try and install apt-get install default-jre
This issue is a conflict between the OpenJDK and Oracle's own DEB distributions for Ubuntu, especially if you've used the webupd8 PPA in the past to install it. I solved it by forcing the override:
sudo apt -o Dpkg::Options::="--force-overwrite" --fix-broken install
You can also force it directly with dpkg by running
sudo dpkg --configure --force-overwrite -a
I initially had default-jdk and default-jre installed on Ubuntu 18.04.
Attempted to host a Minecraft Server for a friend, but was given the error found here
I followed the commentor's advice to reinstall java version 8 rather than version 11 installed above, by following this advice here that being
sudo rm -r /usr/lib/jvm/java-11-oracle
but as a mistake I had removed all files in that folder, leaving just the two directories
java-11-openjdk-amd64
java-8-openjdk-amd64
since then I have attempted to reinstall java using sudo apt-get install default-jdk ; sudo apt-get install default-jre and they install just fine, but running java -version, either as root or as user, returns:
Command 'java' not found, but can be installed with:
sudo apt install default-jre
sudo apt install openjdk-11-jre-headless
sudo apt install openjdk-8-jre-headless
I have scoured askubuntu, digitalocean, and stackoverflow for some answers but I can't find anything that fixes this problem. I also asked my roommate, who is an experienced Computer Science major and who has used ubuntu extensively in the past, and he couldn't find a solution. Has anyone encountered this issue before?
I appreciate any and all responses 😊
Solution has been found. Running:
sudo apt purge -y openjdk-11-jre-headless
sudo apt purge -y openjdk-8-jre-headless
sudo apt purge -y default-jdk
and reinstalling has resolved the issue
Check your path. You should have remove the old jdk using apt-get. I think your system still assumes the old jdk-11 is still present. You could try to re-install it or use update-alternatives to switch to the other version.
Every time I try to install something from terminal this message pops up to me. Meanwhile I have my Java installed right:
download failed
Oracle JDK 9 is NOT installed.
dpkg: error processing package oracle-java9-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
oracle-java9-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
Please can someone help me solve this; it's really annoying.
sudo apt-get purge oracle-java9-installer
solved my issue.
Later I also changed Ubuntu Software center server to "Main Server".
Actually I hit the issue after resolving the wine installation on my Ubuntu 16.04 LTS box. The wine issue I resolved using the below link.
https://askubuntu.com/questions/935050/unknown-error-class-keyerror-the-cache-has-no-package-named-wine1-6-i38
So that landed me to this post. But I was not able to install the java from apt packages. It threw me errors. Then I realized it was the issue of having multiple Java instances on my system. I already had Oracle Java 9 installed. I just needed to change the current verions using the command
sudo update-alternatives --config java
So if any body hits the error, you can try setting this.
I was getting the same error so using this command first i removed Java 9
sudo apt remove oracle-java9-installer
Then I made Java 8 as default
sudo apt-get install oracle-java8-set-default
After this if you try to install other software it will work or you can also upgrade Java 8 to Java 9.
First, add Oracle's PPA, then update your package repository.
$sudo add-apt-repository ppa:webupd8team/java
$sudo apt-get update
To install JDK 9, use the following command:
$sudo apt-get install oracle-java9-installer
I'm not sure what steps you have tried already to install it but the link below is a fairly well explained description of how to install the JDK on Ubuntu. I've always installed the JDK through the webupd8team's ppa and its worked for me so far :)
A note about the link, it suggests setting the home variable, this may be necessary for you but I've never had to it manually and it's worked so give it a quick check before setting the home variable yourself.
https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04
Solved the problem removing all java versions and purging them and re-installing them again probably, thanks everyone who tried to help.
Completely removal criteria:
To remove Oracle JDK completely, run the commands below:
sudo apt-get remove oracle-java9-installer
sudo apt-get remove --auto-remove oracle-java9-installer
sudo apt-get purge oracle-java9-installer
sudo apt-get purge --auto-remove oracle-java9-installer
Resource Link:
https://www.howtoinstall.co/en/ubuntu/trusty/tomcat7?action=remove
After that, install jdk9 using the following command:
Install JDK9 in Ubuntu:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java9-installer
Make it as default:
sudo apt-get install oracle-java9-set-default
Resource Link:
http://zakirrizvi.blogspot.com/2017/10/install-jdk9-in-ubuntu.html
When I tried to use Meteor-cordova to run an app with android, I get this error:
To add the android platform, please install a JDK. Here are some directions: http://openjdk.java.net/install/
Failed to install android_bundle: Failed to run bash
I already have installed JDK but the error still there. Also I tried to install Android SDK manually, but it doesn't work.
Does someone know why this happened and how to fix it?
On Oracle Linux 6
I had this error after
yum install java-1.7.0-openjdk
solution was to install the development package
yum install java-1.7.0-openjdk-devel
then meteor add-package android worked
you should install jdk to be able to compile cordova apps. On ubuntu or ubuntu based distros you can do that so:
sudo apt-get install openjdk-7-jdk