Help me with the basics to building?

ThatGuyLurkin

Well-known member
Jun 4, 2012
2,155
665
0
Visit site
I'm trying to start learning to build with help from Sellers86. I'm having trouble with Java though from Jerryscript's post. I cannot get anything to go correctly. I recently THINK I got sudo going.

I type

Sudo useradd r

Password


Which then gave me Sudo added I suppose? It got rid of errors I was having.

While trying to get Java to install from here - How to install java jdk on ubuntu (linux)

I get to the second step, sudo apt-get install sun-java6-jdk sun-java6-jre , and I get the following output:

noob@ubuntu:~$ sudo apt-get install sun-java6-jdk sun-java6-jre
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package sun-java6-jre is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'sun-java6-jdk' has no installation candidate
E: Package 'sun-java6-jre' has no installation candidate

I have a 32-bit also!


What am I missing? :-\
 
Last edited:

sellers86

Well-known member
Jul 21, 2011
1,837
617
0
Visit site
I'm trying to start learning to build with help from Sellers86. I'm having trouble with Java though from Jerryscript's post. I cannot get anything to go correctly. I recently THINK I got sudo going.

I type

Sudo useradd r

Password


Which then gave me Sudo added I suppose? It got rid of errors I was having.

While trying to get Java to install from here - How to install java jdk on ubuntu (linux)

I get to the second step, sudo apt-get install sun-java6-jdk sun-java6-jre , and I get the following output:

noob@ubuntu:~$ sudo apt-get install sun-java6-jdk sun-java6-jre
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package sun-java6-jre is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'sun-java6-jdk' has no installation candidate
E: Package 'sun-java6-jre' has no installation candidate




What am I missing? :-\

you need to add another repository.. let me find it real fast
 

ThatGuyLurkin

Well-known member
Jun 4, 2012
2,155
665
0
Visit site
Apart from saying, anychance you can do I guide like,

Menu>settings >And so on?

My PC sucks and Ubuntu freezes because it's always trying to update. :)

Sent from my LG-VM670 using Tapatalk 2
 

cole2kb

Retired Moderator
Apr 7, 2011
2,503
547
0
Visit site
I don't know why you're adding a new user, or if that's what the useradd command is even for, seems self explanatory though.Because I have no idea what the random steps you're following are, all I can really think of to tell you is to start from scratch. Fresh Ubuntu installation, follow the first post in this thread, then go back to our own Building thread to find the proper repos to sync with. http://forums.androidcentral.com/ve...ntu-compiling-android-source.html#post1960657
 

ThatGuyLurkin

Well-known member
Jun 4, 2012
2,155
665
0
Visit site
Added a new user because I kept getting Permission denied from Sudo. Ill check the thread out.


Also! I have a 32-bit(adding the OP)

Sent from my LG-VM670 using Tapatalk 2
 

ThatGuyLurkin

Well-known member
Jun 4, 2012
2,155
665
0
Visit site
sudo add-apt-repository "deb http://archive.canonical.com lucid partner"
// or
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse"

use ^ to get java
How do you know what source? What's the Hardy Multiverse?


I clicked a link on what cole shared and it led me to a thing like VMstorage.
You can do a manual install... its really not that hard. You basically move the Java files to /opt and tell dpkg that it is installed

I'm gonna try to install straight down the instructions, I had to reinstall because my password stoppes working xD

Sent from my LG-VM670 using Tapatalk 2
 

BobZhome

Well-known member
Mar 27, 2011
296
627
0
Visit site
These instructions are based on a nice tutorial from John Bokma(Manual installation of Oracle Java JDK on Ubuntu)

Download the JDK from Oracle here: http://download.oracle.com/otn-pub/java/jdk/6u35-b10/jdk-6u35-linux-x64.bin

sudo mkdir -p /usr/local/java

sudo mv ~/Downloads/jdk-6u35-linux-x64.bin /usr/local/java

cd /usr/local/java

sudo chmod +x jdk-6u35-linux-x64.bin

sudo ./jdk-6u35-linux-x64.bin

The installer will attempt to open a browser, but will fail. Presumably this is because the browser is unable to start as root, but this doesn’t seem to affect the install at all. Now remove the installer, and create a symlink to /usr/local/java/latest. This way a new JDK can easily be configured by just moving the /usr/local/java/latest symlink to the most recent version:

sudo rm jdk-6u35-linux-x64.bin

sudo ln -s jdk1.6.0_35 /usr/local/java/64/latest

Next we will need to configure some environmental variables so the JDK will be recognized. Add the JAVA_HOME and JRE_HOME . For example,

sudo gedit /etc/environment

Then replace the contents with the following:

JAVA_HOME="/usr/local/java/latest" JRE_HOME="/usr/local/java/latest/jre" PATH="/usr/local/java/latest/bin:\ /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"

If you don’t want to log out and log back in to have the updated /etc/environment parsed by the system, you can use the ‘source’ command:

source /etc/environment

You can test if it is working correctly using

java -version # and javac -version

The output should look something like this:

java version “1.6.0_35″ Java(TM) SE Runtime Environment (build 1.6.0_35-b04) Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)
 

EarthnFire78

YAY!!! ME :)
Jan 1, 2012
964
232
0
Visit site
If your trying to setup building on Ubuntu 12+ keep in mind that building Android on Ubuntu 12.04 is still experimental, so once you get Java working install these packages next.

Run these commands:
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
  zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
  libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
  libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
  python-markdown libxml2-utils xsltproc zlib1g-dev:i386

$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
 

bkttk2

Well-known member
Jan 6, 2012
89
5
0
Visit site
If your trying to setup building on Ubuntu 12+ keep in mind that building Android on Ubuntu 12.04 is still experimental, so once you get Java working install these packages next.

Run these commands:
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
  zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
  libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
  libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
  python-markdown libxml2-utils xsltproc zlib1g-dev:i386

$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so


ENF78 - Can you comment on if there are any issues using openjdk instead of Sun (Oracle) jdk?
 

EarthnFire78

YAY!!! ME :)
Jan 1, 2012
964
232
0
Visit site
ENF78 - Can you comment on if there are any issues using openjdk instead of Sun (Oracle) jdk?

This is what I used to get Java after installing Sun jdk from Oracle.

Code:
sudo add-apt-repository "deb http://archive.canonical.com lucid partner

Be careful with some updates from Ubuntu through as twice I had to reinstall the needed Java packages and once I had to install the Ubuntu 12.04 packages from Google. I've since set my build machine to not even try installing or looking for those updated that killed me build setup.
 

EarthnFire78

YAY!!! ME :)
Jan 1, 2012
964
232
0
Visit site
What's experimental about it? Different code?

Sent from my LG-VM670 using Tapatalk 2

It is just missing the things need for development that normal come stander, this is one of the reason why some Linux users and nerds dislike Ubuntu 12+. So depending how you have the system setup, development may or may not work.

You can read more about it here.
 

Forum statistics

Threads
943,084
Messages
6,917,188
Members
3,158,813
Latest member
pierre5463