Update-alternatives--install

Source: Internet
Author: User

Up vote 1 down vote favorite

I typed:

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/ jdk1.8.0/bin/java" 1

It ' s says alternatives--install needs link name path priority

Command-Line Edubuntu
ShareImprove this question Edited Jul 5 ' + at 17:48 Guntbert
4,344
Asked Jul 5 ' + at 16:22 Swapnil
18
   ;  
what is typing exactly ? Careful with any punctuation (e.g. dashes) and spaces –  steeldriver jul 5 ' + at 16:42
   ;  
@steeldriver could explain link name path priority. If There were no link like "/user/bin/java/" then would erroneous result? –  swapnil jul 5 ' + at 16:53
   ;  
it should create the link (and the name if there is no current Java Group in /etc/ Alternatives ). AFAIK the only thing, must pre-exist is the path component i.e. /usr/lib/jvm/jdk1.8.0/bin/java - But note this (as posted in your question) has a space in yours-hence my 1st comment. –  steeldriver jul 5 ' + at 16:58
   ;  
@steeldriver yeah/usr/lib/jvm/bin/java/is available. I ' ve try sudo update-alternatives--Install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0.05/bin/java" 1–  Swapnil Jul 5 ' 17:22
is you leaving a space between -- install the and the word "if so", don ' t-it needs to be --install . Also the quotes should not be necessary, just sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0.05/bin/java 1 –steeldriver Jul 5 ' in 17:35
Show1More Comment
2 Answers Active oldest votes
Up vote 3 down vote accepted

Is you leaving a space between the--and the word install? If so, don ' t-it needs --install

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0.05/bin/java 1

The quotes should not being necessary since none of the elements has embedded spaces-although they shouldn ' t do any harm.

ShareImprove this answer answered Jul 5 ' + at 17:45 steeldriver
13.6k3
Add a Comment
Up vote 1 down vote

This is beacause the This command maintains symbolic links. I recommend to execute to get more information about the man update-alternatives command.

ShareImprove this answer

Update-alternatives--install

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.