引き続きReact Native の開発環境を整える(React Native開発実践~第0回)を参考に作業を続けました。
JDK8
続いてJDK8。オープンのJDKがあることにまずびっくり。続いてバージョン番号で悩んだ。
参考ページのリンク AdoptOpenJDKをまずは開く。
トップページの最新はjdk-21.0.1+12とのこと。JDK8の最終版を確認しようと"Other platforms and versions"をクリック。
Operating SystemでWindowsを選択し、Versionは8 - LTSを選ぶ。そうすると、以下のような表示が。
OS | Architecture | Package Type |
---|---|---|
jdk8u392-b08 | Windows | x86 |
jdk8u392-b08 | Windows | x64 |
参考ページのバージョン指定は8.192と書いてある。jdk8u392ってことは、8.392なのか?
そう思って以下のように実行。見事にだめだった。
d:\>choco install adoptopenjdk --version 8.392 -y
Chocolatey v2.2.2
Installing the following packages:
adoptopenjdk
By installing, you accept licenses for the packages.
adoptopenjdk not installed. The package was not found with the source(s) listed.
Source(s): 'https://community.chocolatey.org/api/v2/'
NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify `--pre`,
the package may not be found.
Version was specified as '8.392'. It is possible that version
does not exist for 'adoptopenjdk' at the source specified.
Please see https://docs.chocolatey.org/en-us/troubleshooting for more
assistance.
Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
- adoptopenjdk - adoptopenjdk not installed. The package was not found with the source(s) listed.
Source(s): 'https://community.chocolatey.org/api/v2/'
NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify `--pre`,
the package may not be found.
Version was specified as '8.392'. It is possible that version
does not exist for 'adoptopenjdk' at the source specified.
Please see https://docs.chocolatey.org/en-us/troubleshooting for more
assistance.
Did you know the proceeds of Pro (and some proceeds from other
licensed editions) go into bettering the community infrastructure?
Your support ensures an active community, keeps Chocolatey tip-top,
plus it nets you some awesome features!
https://chocolatey.org/compare
d:\>
もしかして、-b08もつけるとうまくいくのでは?と淡い期待をしたが、やっぱりだめ。
d:\>choco install adoptopenjdk --version 8u392-b08 -y
Chocolatey v2.2.2
Installing the following packages:
adoptopenjdk
By installing, you accept licenses for the packages.
Chocolatey installed 0/0 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
'8u392-b08' is not a valid version string.
パラメーター名:value
d:\>
早々にあきらめて、8.192を指定。見事にうまくいった。
d:\>choco install adoptopenjdk --version 8.192 -y
Chocolatey v2.2.2
Installing the following packages:
adoptopenjdk
By installing, you accept licenses for the packages.
Progress: Downloading adoptopenjdk 8.192... 100%
adoptopenjdk v8.192.0 [Approved]
adoptopenjdk package files install completed. Performing other installation steps.
Using system proxy server 'XXX.XXX.XXX.XXX:XXXX'.
Downloading adoptopenjdk
from 'https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u192-b12/OpenJDK8U-jdk_x64_windows_hotspot_8u192b12.zip'
Using system proxy server 'XXX.XXX.XXX.XXX:XXXX'.
Progress: 100% - Completed download of C:\Users\XXXX\AppData\Local\Temp\chocolatey\adoptopenjdk\8.192.0\OpenJDK8U-jdk_x64_windows_hotspot_8u192b12.zip (72.92 MB).
Download of OpenJDK8U-jdk_x64_windows_hotspot_8u192b12.zip (72.92 MB) completed.
Extracting C:\Users\XXXX\AppData\Local\Temp\chocolatey\adoptopenjdk\8.192.0\OpenJDK8U-jdk_x64_windows_hotspot_8u192b12.zip to C:\Program Files\AdoptOpenJDK...
C:\Program Files\AdoptOpenJDK
PATH environment variable does not have C:\Program Files\AdoptOpenJDK\jdk8u192-b12\bin in it. Adding...
Environment Vars (like PATH) have changed. Close/reopen your shell to
see the changes (or in powershell/cmd.exe just type `refreshenv`).
The install of adoptopenjdk was successful.
Software installed to 'C:\Program Files\AdoptOpenJDK'
Chocolatey installed 1/1 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
d:\>
ログを見ると、githubからとってきているよう。なのでそちらも確認してみた。Latestはjdk8u292-b10_openj9-0.26.0と書いてあるが。。。
結局どこがバージョン番号なのかわからずじまい。なお、8.192ではJAVA_HOMEもちゃんと設定されていた。
Python
続いてPython。最近はどうやらPython3らしいので、インストールはそちらで実行。
d:\>choco install python3 -y
Chocolatey v2.2.2
Installing the following packages:
python3
By installing, you accept licenses for the packages.
Progress: Downloading chocolatey-windowsupdate.extension 1.0.5... 100%
chocolatey-windowsupdate.extension v1.0.5 [Approved]
chocolatey-windowsupdate.extension package files install completed. Performing other installation steps.
Installed/updated chocolatey-windowsupdate extensions.
The install of chocolatey-windowsupdate.extension was successful.
Software installed to 'C:\ProgramData\chocolatey\extensions\chocolatey-windowsupdate'
Progress: Downloading KB2999226 1.0.20181019... 100%
KB2999226 v1.0.20181019 [Approved] - Possibly broken
KB2999226 package files install completed. Performing other installation steps.
Skipping installation because update KB2999226 does not apply to this operating system (Microsoft Windows 10 Pro).
Environment Vars (like PATH) have changed. Close/reopen your shell to
see the changes (or in powershell/cmd.exe just type `refreshenv`).
The install of KB2999226 was successful.
Software install location not explicitly set, it could be in package or
default install location of installer.
Progress: Downloading KB3035131 1.0.3... 100%
KB3035131 v1.0.3 [Approved]
KB3035131 package files install completed. Performing other installation steps.
Skipping installation because update KB3035131 does not apply to this operating system (Microsoft Windows 10 Pro).
Environment Vars (like PATH) have changed. Close/reopen your shell to
see the changes (or in powershell/cmd.exe just type `refreshenv`).
The install of KB3035131 was successful.
Software install location not explicitly set, it could be in package or
default install location of installer.
Progress: Downloading KB3033929 1.0.5... 100%
KB3033929 v1.0.5 [Approved]
KB3033929 package files install completed. Performing other installation steps.
Skipping installation because update KB3033929 does not apply to this operating system (Microsoft Windows 10 Pro).
Environment Vars (like PATH) have changed. Close/reopen your shell to
see the changes (or in powershell/cmd.exe just type `refreshenv`).
The install of KB3033929 was successful.
Software install location not explicitly set, it could be in package or
default install location of installer.
Progress: Downloading vcredist140 14.36.32532... 100%
vcredist140 v14.36.32532 [Approved]
vcredist140 package files install completed. Performing other installation steps.
Using system proxy server 'XXX.XXX.XXX.XXX:XXXX'.
Downloading vcredist140-x86
from 'https://download.visualstudio.microsoft.com/download/pr/eaab1f82-787d-4fd7-8c73-f782341a0c63/5365A927487945ECB040E143EA770ADBB296074ECE4021B1D14213BDE538C490/VC_redist.x86.exe'
Using system proxy server 'XXX.XXX.XXX.XXX:XXXX'.
Progress: 100% - Completed download of C:\Users\XXXX\AppData\Local\Temp\chocolatey\vcredist140\14.36.32532\VC_redist.x86.exe (13.2 MB).
Download of VC_redist.x86.exe (13.2 MB) completed.
Hashes match.
Installing vcredist140-x86...
vcredist140-x86 has been installed.
Using system proxy server 'XXX.XXX.XXX.XXX:XXXX'.
Downloading vcredist140-x64 64 bit
from 'https://download.visualstudio.microsoft.com/download/pr/eaab1f82-787d-4fd7-8c73-f782341a0c63/917C37D816488545B70AFFD77D6E486E4DD27E2ECE63F6BBAAF486B178B2B888/VC_redist.x64.exe'
Using system proxy server 'XXX.XXX.XXX.XXX:XXXX'.
Progress: 100% - Completed download of C:\Users\XXXX\AppData\Local\Temp\chocolatey\vcredist140\14.36.32532\VC_redist.x64.exe (24.18 MB).
Download of VC_redist.x64.exe (24.18 MB) completed.
Hashes match.
Installing vcredist140-x64...
vcredist140-x64 has been installed.
vcredist140 may be able to be automatically uninstalled.
Environment Vars (like PATH) have changed. Close/reopen your shell to
see the changes (or in powershell/cmd.exe just type `refreshenv`).
The install of vcredist140 was successful.
Software installed as 'exe', install location is likely default.
Progress: Downloading vcredist2015 14.0.24215.20170201... 100%
vcredist2015 v14.0.24215.20170201 [Approved]
vcredist2015 package files install completed. Performing other installation steps.
The install of vcredist2015 was successful.
Software installed to 'C:\ProgramData\chocolatey\lib\vcredist2015'
Progress: Downloading python312 3.12.0... 100%
python312 v3.12.0 [Approved]
python312 package files install completed. Performing other installation steps.
Installing 64-bit python312...
python312 has been installed.
Added C:\ProgramData\chocolatey\bin\python3.12.exe shim pointed to 'c:\python312\python.exe'.
Python installed to: 'C:\Python312'
Restricting write permissions to Administrators
python312 can be automatically uninstalled.
Environment Vars (like PATH) have changed. Close/reopen your shell to
see the changes (or in powershell/cmd.exe just type `refreshenv`).
The install of python312 was successful.
Software installed as 'exe', install location is likely default.
Progress: Downloading python3 3.12.0... 100%
python3 v3.12.0 [Approved]
python3 package files install completed. Performing other installation steps.
The install of python3 was successful.
Software installed to 'C:\ProgramData\chocolatey\lib\python3'
Chocolatey installed 8/8 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Installed:
- chocolatey-windowsupdate.extension v1.0.5
- KB2999226 v1.0.20181019
- KB3033929 v1.0.5
- KB3035131 v1.0.3
- python3 v3.12.0
- python312 v3.12.0
- vcredist140 v14.36.32532
- vcredist2015 v14.0.24215.20170201
Packages requiring reboot:
- vcredist140 (exit code 3010)
The recent package changes indicate a reboot is necessary.
Please reboot at your earliest convenience.
d:\>python --version
d:\>
再起動を、となっていたがそのままpython --versionを打ってみたらやはりだめだった。
おとなしくコマンドプロンプトを開き直し、バージョン確認に成功。
次はAndroid Studio。手ごわそうなのでここでいったん中断。