I have some problems in Ubuntu - General Questions and Answers

After a few days, a message shows in my Ubuntu. It says that the software is out update. This is an red triangule.

Go to terminal.
PHP:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-update
Will check for updates and update everything.

Related

[HOWTO] Install Java 7 on Ubuntu 12.04

I'm not sure if this is in the right spot (if not I apologize), but I figure it is because this relates directly to building Android.
When I upgraded to Ubuntu 12.04, all the sudden I couldn't install Java (sha256sum mismatch jdk-7u3-linux-x64.tar.gz), which means I can't do much deving. Well I searched through the interweb and finally found a solution.
First:
Code:
sudo add-apt-repository ppa:eugenesan/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
By now, you have probably gotten an error and the terminal has stated that Java was not installed. No problem.
Second:
Download Java directly from Oracle: http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u3-download-1501626.html
Now, move what you just downloaded to /var/cache/oracle-java7-installer/
Third:
Code:
sudo gedit /var/lib/dpkg/info/oracle-java7-installer.postinst
Now scroll down and find the following:
Code:
echo "Downloading..."
rm -f $FILENAME
WGETRC=wgetrc wget $PARTNER_URL \
|| fp_exit_with_error "download failed"
rm -f wgetrc
echo "Download done."
Now put a # next to each line between "Downloading..." and "Downloading done."
Code:
echo "Downloading..."
#rm -f $FILENAME
#WGETRC=wgetrc wget $PARTNER_URL \
#|| fp_exit_with_error "download failed"
#rm -f wgetrc
echo "Download done."
Save, and go back to your terminal.
Finally, do:
Code:
sudo apt-get install oracle-java7-installer
Java should now install properly.
Source:
http://www.ubuntugeek.com/how-to-install-oracle-java-7-in-ubuntu-12-04.html (most helpful info is in the comments)
Make long story short, it didn't execute commands as root? Shame on Java!
Is it working on other distroes debian based like Mint?
umb3rts said:
Make long story short, it didn't execute commands as root? Shame on Java!
Is it working on other distroes debian based like Mint?
Click to expand...
Click to collapse
Haven't tried on any other distros.
Sent from my ADR6400L using xda premium
AFAIK you need java 6 installed to build android. Not to mention Ubuntu 12.04 is still in the final stages of beta lol.
Well for what I do java 7 is fine with me
Sent from my ADR6400L using xda premium
THANK YOU SO MUCH. took me a good 2 hours to find this guide. Now I can finally install curl. wtff..
So this is for 64-bit right? That's what I'm using
sparksco said:
So this is for 64-bit right? That's what I'm using
Click to expand...
Click to collapse
I guess. I'm running 64 and it works.
Sent from my Galaxy Nexus using xda premium
Installing java on Ubuntu 12.04
This is what work for me for installing java in Ubuntu 12.04
sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*
sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get update
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
http://askubuntu.com/questions/1263...-x64-tar-gz-error-when-trying-to-install-orac

[Ubuntu] on screen keyboard

hi guys,
I installed lilstevie's ubuntu img. I have a problem: i can't pass the welcome screen cause i don't have a dock and i can't chose username and password. Is there a solution to have an on screen keyboard at this stage?
Assuming you have an Ubuntu Desktop try this:
You need adb
Install adb pre-quantal
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update && sudo apt-get install android-tools-adb
on quantal
sudo apt-get install android-tools-adb
Connect your tablet to your Computer. Open a terminal and type
adb shell
DISPLAY=:0 onboard

C/C++ compilation error

Got below error message when trying to compile C++ helloworld program
[email protected]:~/Documents/c++program$ g++ helloworld.cpp -o hello
In file included from /usr/include/c++/4.7/arm-linux-gnueabihf/./bits/os_defines.h:40:0,
from /usr/include/c++/4.7/arm-linux-gnueabihf/./bits/c++config.h:414,
from /usr/include/c++/4.7/iostream:39,
from helloworld.cpp:1:
/usr/include/features.h:357:25: fatal error: sys/cdefs.h: No such file or directory
compilation terminated.
I tried updating my g++ compiler but no lock
sudo apt-get install g++
Anybody worked this issue before? Appreciate your guidance...
Try reinstalling libc6.
sudo apt-get install --reinstall libc6-dev
Sent from whatever device I happened to pick up.
Clegs said:
Try reinstalling libc6.
sudo apt-get install --reinstall libc6-dev
Sent from whatever device I happened to pick up.
Click to expand...
Click to collapse
I believe build-essential is available so if you're still having trouble try:
Code:
sudo apt-get install build-essential
That should pull in all you generally need to get going.

AOSP now requires Java 7, and works with OpenJDK

I was just looking at the build instructions page for AOSP and noticed a significant change that must've just happened in the last week or so. Apparently Java 7 is now required, and Google officially recommends using OpenJDK. Under where it says "To develop for older versions..." it lists Java 6 next to KitKat, meaning this is apparently for code newer than KitKat. I don't think OpenJDK was compatible before, so that plus the move to Java 7 seems noteworthy. Can anybody who watches AOSP commits comment on when this change occurred? Is this signifying a non-minor update is coming after KitKat?
For reference, here is the relevant text of the current page at http://source.android.com/source/initializing.html:
Code:
Installing the JDK
The latest version of Android in the Android Open Source Project (AOSP) requires Java 7. On Ubuntu, use OpenJDK.
Java 7: For the latest version of Android
$ sudo apt-get update
$ sudo apt-get install openjdk-7-jdk
Optionally, update the default Java version by running:
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac
To develop older versions of Android, download and install the corresponding version of the Java JDK:
Java 6: for Gingerbread through KitKat
Java 5: for Cupcake through Froyo
And this is what it said on Feb. 16 according to Wayback Machine:
Code:
Installing the JDK
The Sun JDK is no longer in Ubuntu's main package repository. In order to download it, you need to add the appropriate repository and indicate to the system which JDK should be used.
Java 6: for Gingerbread and newer
$ sudo add-apt-repository "deb [url]http://archive.canonical.com/[/url] lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk
Java 5: for Froyo and older
$ sudo add-apt-repository "deb [url]http://archive.ubuntu.com/ubuntu[/url] hardy main multiverse"
$ sudo add-apt-repository "deb [url]http://archive.ubuntu.com/ubuntu[/url] hardy-updates main multiverse"
$ sudo apt-get update
$ sudo apt-get install sun-java5-jdk
xdp said:
Can anybody who watches AOSP commits comment on when this change occurred? Is this signifying a non-minor update is coming after KitKat?
Click to expand...
Click to collapse
Here's the change: https://android.googlesource.com/platform/build/+/c84889b80ae40dec85ac4810fc500db70cbc82b2
Since this is already online, I wouldn't expect this to be a sign for a big update. One of the beasts that needed JDK6 was chromium. I took a quick look into the changes and didn't see really much. Only some fixes to be able to compile with JDK7. I'll give it a try if it compiles.
So has anyone meanwhile successfully built Lollipop with OpenJDK?

nethunter-e2nac-armhf

Device: LG-D393 rooted && busybox installed
1. make nandroid backup
2. Im not your Mom!
3. Im not responsible for you!
4. If you want to donate, my E-Mail && PayPal: [email protected]
5. dowload e2nac-nh_kernel && e2nac-nh_kalifs from https://www.dropbox.com/s/jnkbydmq2vepufv/e2nac_flashables.zip?dl=0
6. download && install FlashFire-v0.73.apk from http://download.chainfire.eu/1218/FlashFire/FlashFire-v0.73-20170921123305.apk
7. open FlashFire && grant
8. flash e2nac-nh_kernel.zip && e2nac-nh_rootfs.zip
9. open nh_app && grant
10. open nh_terminal_app and lunch kali
11. apt install wget
12. wget https://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2018.1_all.deb
13. apt install ./kali-archive-keyring_2018.1_all.deb
14. apt -y install apt-utils && apt -y install dialog && apt -y install sudo
15. apt update && apt -y full-upgrade
16. sudo su
17. sudo apt-get update && apt-get -y upgrade
18. sudo apt-get dist-upgrade
19. sudo apt-get install kali-linux-nethunter
20. reboot system
21. :good: paypal.me/VGarne :good:

Categories

Resources