javaをインストールすると、update-alternativesが無効なオプションを返します。

javaをインストールすると、update-alternativesが無効なオプションを返します。

java次の場所にインストールしようとしていますdebian jessie 8.8

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

私は得る:

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

私は命令に何も欠けているとは思わない。マニュアルページそしてman update-alternatives言った:

   --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.

私はそれを試して、--force同じ結果を得ました。debianどのバージョン(たとえば、7、6、8.2、8.8など)でも、これらの問題が発生したことはありません。

ベストアンサー1

このコマンドをどこかでコピーして貼り付けると、ASCII文字の代わりにUnicode文字が表示されることがあります(ダッシュではなくダッシュ、スペースの-代わりに改行しないスペースなど)。ただし、ダッシュや類似の記号の場合は、オプションパラメータとして扱われません(ただし、認識されないオプションとして扱われます)。--install /usr/bin/javaエラーにパラメータとして表示されるため、間のスペースはASCIIスペースではないかもしれませんが、Unicode

おすすめ記事