update-alternatives returns invalid option when installing java [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I am trying to install java on a debian jessie 8.8:



sudo update-alternatives --install /usr/bin/java java /usr/local/PeykAsa/jdk1.7.0/bin/java 315


I get:



update-alternatives: unknown option `--install /usr/bin/java'
Use 'update-alternatives --help' for program usage information.


I don't think the command is missing something, as man page and man update-alternatives says so:



 --install link name path priority [--slave link name path]...
Add a group of alternatives to the system. link is the generic name for the master link, name is the name of its symlink in the alternatives directory, and path is the alternative being
introduced for the master link. The arguments after --slave are the generic name, symlink name in the alternatives directory and the alternative path for a slave link. Zero or more --slave
options, each followed by three arguments, may be specified. Note that the master alternative must exist or the call will fail. However if a slave alternative doesn't exist, the corresponding
slave alternative link will simply not be installed (a warning will still be displayed). If some real file is installed where an alternative link has to be installed, it is kept unless --force
is used.

If the alternative name specified exists already in the alternatives system's records, the information supplied will be added as a new set of alternatives for the group. Otherwise, a new
group, set to automatic mode, will be added with this information. If the group is in automatic mode, and the newly added alternatives' priority is higher than any other installed alterna‐
tives for this group, the symlinks will be updated to point to the newly added alternatives.


I tried --force, got the same output. I have never faced such issue on debian, on any versions (e.g. 7, 6, 8.2, 8.8, etc.).







share|improve this question











closed as off-topic by Stephen Kitt, schily, Jeff Schaller, GAD3R, slm♦ Jun 28 at 3:29


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Stephen Kitt, schily, Jeff Schaller, GAD3R, slm
If this question can be reworded to fit the rules in the help center, please edit the question.








  • 2




    Are you sure that’s a standard space between --install and /usr/bin/java? It looks like it could be a non-breaking space instead.
    – Stephen Kitt
    Jun 27 at 8:12










  • @StephenKitt that's what it was, following from the comment here.
    – muru
    Jun 27 at 8:22










  • @StephenKitt, you are right. I asked it first in ubuntu forum (my mistake). This question was moved from there. muru answered it there and also here.
    – Zeinab Abbasimazar
    Jun 27 at 13:08














up vote
1
down vote

favorite












I am trying to install java on a debian jessie 8.8:



sudo update-alternatives --install /usr/bin/java java /usr/local/PeykAsa/jdk1.7.0/bin/java 315


I get:



update-alternatives: unknown option `--install /usr/bin/java'
Use 'update-alternatives --help' for program usage information.


I don't think the command is missing something, as man page and man update-alternatives says so:



 --install link name path priority [--slave link name path]...
Add a group of alternatives to the system. link is the generic name for the master link, name is the name of its symlink in the alternatives directory, and path is the alternative being
introduced for the master link. The arguments after --slave are the generic name, symlink name in the alternatives directory and the alternative path for a slave link. Zero or more --slave
options, each followed by three arguments, may be specified. Note that the master alternative must exist or the call will fail. However if a slave alternative doesn't exist, the corresponding
slave alternative link will simply not be installed (a warning will still be displayed). If some real file is installed where an alternative link has to be installed, it is kept unless --force
is used.

If the alternative name specified exists already in the alternatives system's records, the information supplied will be added as a new set of alternatives for the group. Otherwise, a new
group, set to automatic mode, will be added with this information. If the group is in automatic mode, and the newly added alternatives' priority is higher than any other installed alterna‐
tives for this group, the symlinks will be updated to point to the newly added alternatives.


I tried --force, got the same output. I have never faced such issue on debian, on any versions (e.g. 7, 6, 8.2, 8.8, etc.).







share|improve this question











closed as off-topic by Stephen Kitt, schily, Jeff Schaller, GAD3R, slm♦ Jun 28 at 3:29


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Stephen Kitt, schily, Jeff Schaller, GAD3R, slm
If this question can be reworded to fit the rules in the help center, please edit the question.








  • 2




    Are you sure that’s a standard space between --install and /usr/bin/java? It looks like it could be a non-breaking space instead.
    – Stephen Kitt
    Jun 27 at 8:12










  • @StephenKitt that's what it was, following from the comment here.
    – muru
    Jun 27 at 8:22










  • @StephenKitt, you are right. I asked it first in ubuntu forum (my mistake). This question was moved from there. muru answered it there and also here.
    – Zeinab Abbasimazar
    Jun 27 at 13:08












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am trying to install java on a debian jessie 8.8:



sudo update-alternatives --install /usr/bin/java java /usr/local/PeykAsa/jdk1.7.0/bin/java 315


I get:



update-alternatives: unknown option `--install /usr/bin/java'
Use 'update-alternatives --help' for program usage information.


I don't think the command is missing something, as man page and man update-alternatives says so:



 --install link name path priority [--slave link name path]...
Add a group of alternatives to the system. link is the generic name for the master link, name is the name of its symlink in the alternatives directory, and path is the alternative being
introduced for the master link. The arguments after --slave are the generic name, symlink name in the alternatives directory and the alternative path for a slave link. Zero or more --slave
options, each followed by three arguments, may be specified. Note that the master alternative must exist or the call will fail. However if a slave alternative doesn't exist, the corresponding
slave alternative link will simply not be installed (a warning will still be displayed). If some real file is installed where an alternative link has to be installed, it is kept unless --force
is used.

If the alternative name specified exists already in the alternatives system's records, the information supplied will be added as a new set of alternatives for the group. Otherwise, a new
group, set to automatic mode, will be added with this information. If the group is in automatic mode, and the newly added alternatives' priority is higher than any other installed alterna‐
tives for this group, the symlinks will be updated to point to the newly added alternatives.


I tried --force, got the same output. I have never faced such issue on debian, on any versions (e.g. 7, 6, 8.2, 8.8, etc.).







share|improve this question











I am trying to install java on a debian jessie 8.8:



sudo update-alternatives --install /usr/bin/java java /usr/local/PeykAsa/jdk1.7.0/bin/java 315


I get:



update-alternatives: unknown option `--install /usr/bin/java'
Use 'update-alternatives --help' for program usage information.


I don't think the command is missing something, as man page and man update-alternatives says so:



 --install link name path priority [--slave link name path]...
Add a group of alternatives to the system. link is the generic name for the master link, name is the name of its symlink in the alternatives directory, and path is the alternative being
introduced for the master link. The arguments after --slave are the generic name, symlink name in the alternatives directory and the alternative path for a slave link. Zero or more --slave
options, each followed by three arguments, may be specified. Note that the master alternative must exist or the call will fail. However if a slave alternative doesn't exist, the corresponding
slave alternative link will simply not be installed (a warning will still be displayed). If some real file is installed where an alternative link has to be installed, it is kept unless --force
is used.

If the alternative name specified exists already in the alternatives system's records, the information supplied will be added as a new set of alternatives for the group. Otherwise, a new
group, set to automatic mode, will be added with this information. If the group is in automatic mode, and the newly added alternatives' priority is higher than any other installed alterna‐
tives for this group, the symlinks will be updated to point to the newly added alternatives.


I tried --force, got the same output. I have never faced such issue on debian, on any versions (e.g. 7, 6, 8.2, 8.8, etc.).









share|improve this question










share|improve this question




share|improve this question









asked Jun 27 at 8:07









Zeinab Abbasimazar

1449




1449




closed as off-topic by Stephen Kitt, schily, Jeff Schaller, GAD3R, slm♦ Jun 28 at 3:29


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Stephen Kitt, schily, Jeff Schaller, GAD3R, slm
If this question can be reworded to fit the rules in the help center, please edit the question.




closed as off-topic by Stephen Kitt, schily, Jeff Schaller, GAD3R, slm♦ Jun 28 at 3:29


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Stephen Kitt, schily, Jeff Schaller, GAD3R, slm
If this question can be reworded to fit the rules in the help center, please edit the question.







  • 2




    Are you sure that’s a standard space between --install and /usr/bin/java? It looks like it could be a non-breaking space instead.
    – Stephen Kitt
    Jun 27 at 8:12










  • @StephenKitt that's what it was, following from the comment here.
    – muru
    Jun 27 at 8:22










  • @StephenKitt, you are right. I asked it first in ubuntu forum (my mistake). This question was moved from there. muru answered it there and also here.
    – Zeinab Abbasimazar
    Jun 27 at 13:08












  • 2




    Are you sure that’s a standard space between --install and /usr/bin/java? It looks like it could be a non-breaking space instead.
    – Stephen Kitt
    Jun 27 at 8:12










  • @StephenKitt that's what it was, following from the comment here.
    – muru
    Jun 27 at 8:22










  • @StephenKitt, you are right. I asked it first in ubuntu forum (my mistake). This question was moved from there. muru answered it there and also here.
    – Zeinab Abbasimazar
    Jun 27 at 13:08







2




2




Are you sure that’s a standard space between --install and /usr/bin/java? It looks like it could be a non-breaking space instead.
– Stephen Kitt
Jun 27 at 8:12




Are you sure that’s a standard space between --install and /usr/bin/java? It looks like it could be a non-breaking space instead.
– Stephen Kitt
Jun 27 at 8:12












@StephenKitt that's what it was, following from the comment here.
– muru
Jun 27 at 8:22




@StephenKitt that's what it was, following from the comment here.
– muru
Jun 27 at 8:22












@StephenKitt, you are right. I asked it first in ubuntu forum (my mistake). This question was moved from there. muru answered it there and also here.
– Zeinab Abbasimazar
Jun 27 at 13:08




@StephenKitt, you are right. I asked it first in ubuntu forum (my mistake). This question was moved from there. muru answered it there and also here.
– Zeinab Abbasimazar
Jun 27 at 13:08










1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










If you copy-pasted the command from somewhere, you probably got a Unicode character instead of an ASCII one (em-dash instead of -, or non-breaking space instead of space, etc.). If it were an em-dash or similar, however, it wouldn't be seen as an option argument (instead it's seen as an unrecognized option). Since --install /usr/bin/java is presented as one argument in the error, the space in between is probably not an ASCII space, but a Unicode one.






share|improve this answer




























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote



    accepted










    If you copy-pasted the command from somewhere, you probably got a Unicode character instead of an ASCII one (em-dash instead of -, or non-breaking space instead of space, etc.). If it were an em-dash or similar, however, it wouldn't be seen as an option argument (instead it's seen as an unrecognized option). Since --install /usr/bin/java is presented as one argument in the error, the space in between is probably not an ASCII space, but a Unicode one.






    share|improve this answer

























      up vote
      2
      down vote



      accepted










      If you copy-pasted the command from somewhere, you probably got a Unicode character instead of an ASCII one (em-dash instead of -, or non-breaking space instead of space, etc.). If it were an em-dash or similar, however, it wouldn't be seen as an option argument (instead it's seen as an unrecognized option). Since --install /usr/bin/java is presented as one argument in the error, the space in between is probably not an ASCII space, but a Unicode one.






      share|improve this answer























        up vote
        2
        down vote



        accepted







        up vote
        2
        down vote



        accepted






        If you copy-pasted the command from somewhere, you probably got a Unicode character instead of an ASCII one (em-dash instead of -, or non-breaking space instead of space, etc.). If it were an em-dash or similar, however, it wouldn't be seen as an option argument (instead it's seen as an unrecognized option). Since --install /usr/bin/java is presented as one argument in the error, the space in between is probably not an ASCII space, but a Unicode one.






        share|improve this answer













        If you copy-pasted the command from somewhere, you probably got a Unicode character instead of an ASCII one (em-dash instead of -, or non-breaking space instead of space, etc.). If it were an em-dash or similar, however, it wouldn't be seen as an option argument (instead it's seen as an unrecognized option). Since --install /usr/bin/java is presented as one argument in the error, the space in between is probably not an ASCII space, but a Unicode one.







        share|improve this answer













        share|improve this answer



        share|improve this answer











        answered Jun 27 at 8:22









        muru

        33.1k576140




        33.1k576140












            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?