[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: about installing Java



Richard Hector 於 2015-2-13 20:40 寫道:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 13/02/15 16:54, Jack Chuge wrote:

They say to run the following: <code> su - echo "deb
http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" |
tee /etc/apt/sources.list.d/webupd8team-java.list


It seems it's not allowed sudo instead of su for calling root
permission. Sadly, I've not setup a su password. How to fix it?
Thank you.

Finally, I typed sudo before the code every time and it proceeded
successfully until the last line code proceeding. It said: Can't
locate the packages of oracla-java8-installer. Where occurs
errors?

Hi Jack,

2 things spring to mind.

Firstly, I would get a root shell using "sudo -s" instead of "su -" -
that should work with your sudo config, and doesn't need a root password.

Alternatively, when you used this line:
echo "deb ..." | tee /etc/apt/...java.list

did you put sudo in front of tee as well? Like this:
sudo echo "deb ..." | sudo tee /etc/apt/...java.list

Otherwise, I think tee won't run as root, and therefore won't be able
to write to the file. That might be why it couldn't find the packages.

I think I'd use the first option - get a root shell.

Richard


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQEcBAEBAgAGBQJU3eyTAAoJELSi8I/scBaNgAoH/itu3vNhJIh5q0gXo/Irs/mL
Ar5g/bg7oZpQpN2UeIKSu2qXVEgLQRsVZ+kKTyNnug5HDrcQ6oRNbrQnsIfRf1sF
jgje7CfL0YQLNGgtowNHKHw4BLEXDI+XObnH6jQ3jw1iTFk55q4/WG1ZlNur2slG
8JHG15SliJjOmNzEDWPyh86Ai4ZBj5OvldCEzV57/ZNo3znM3SFveheQFXEPDOOu
ohyPoV3Qp5cEGnB4IQ4aQmUSgV2gP8tx7AKdK0ymoM3QeQaTOUvauSTnKzbYG1+O
Gcsf9W6DBK+JZzfAUMQRFpdukvoctPF18S5HdmqaU3hDkKIQYsIBV3h4fojLvrU=
=JpsZ
-----END PGP SIGNATURE-----


Thank you very much. A great point to me, I see the light.

--
I like hk.politics. ^_^


Reply to: