
gnome のターミナルから何か (InstallAnywhere を使用) をインストールしようとすると、次のようなメッセージが表示されます。
Preparing to install...
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
No Java virtual machine could be found from your PATH
environment variable. You must install a VM prior to
running this program.
この問題を回避するには、インストールを開始する前にlocalhost
経由で接続するssh
か、 でコンソールに切り替えますctrl+alt+f[x]
。
java
コマンドラインから呼び出すか、whereis java
適切なパスを表示します。
答え1
スクリプトで PATH やその他の環境変数を設定およびエクスポートし~/.xprofile
、Java を X セッションで表示できるようにすることができます。その後、X サーバーに再度ログインする必要があります。
export PATH="$PATH:/path_to_jre/bin"
を変更しても同じ結果を得ることができます/etc/environment
。その後再起動する必要があります。
PATH="...:/path_to_jre/bin"
env コマンドで PATH 変数を確認します。
env | grep PATH