It is possible to install Salesforce cli through command line?
It is possible to install Salesforce cli through command line?
You can use normal SFDX CLI installer: https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm
If you use Chocolatey and choco install sfdx-cli
throws you some errors – usually the info what to do about the error is right there in the message.
Error –
hashes do not match. Actual value was
947036CB8228616B0C9A94B9F11FD43225188C1839A7475930288CA650B78361.
ERROR: Checksum for
C:Users[redacted]AppDataLocalTempchocolateysfdx-cli6.0.16sfdx-windows-amd64.exe
did not meet
9C33344AED91F6CC2CF97A64A69D99CBAD9EBBF4A28920B8160CDFCE83772326 for
checksum type sha256. Consider passing the actual checksums through
with –checksum –checksum64 once you validate the checksums are
appropriate. A less secure option is to pass –ignore-checksums if
necessary. The install of sfdx-cli was NOT successful.
choco install sfdx-cli --ignore-checksums
should work OK.
Next error you might get will be about typos in the install script (author of choco package didnt escape spaces properly and it dies on C:Program Files, at least on my machine):
C:Program is not recognized as an internal or external command,
operable program or batch file. ERROR: Running [cmd /C C:Program
Filessfdxbinsfdx.exe update] was not successful. Exit code was
1. See log for possible error
We can have a look at whats in the install script, failed installations typically are copied to lib-bad: C:ProgramDatachocolateylib-badsfdx-clitools
Im not a PowerShell guru but by the look of it it just tries to run sfdx update
at the end of installation. I can skip the script and run it manually.
choco install sfdx-cli --ignore-checksums -n
works OK
and then close the console (to reload the PATH variables). Open new console and
sfdx update
will work too.
sfdx-cli: Updating CLI… already on latest version: 7.54.4-8ff9ba9cc5
Try to download Node.js via chocolatey:
cinst nodejs.install
and then use npm (gets installed with Node.js) to download the Salesforce-CLI:
npm install --global sfdx-cli
It is possible to install Salesforce cli through command line?
Install Node JS
curl -sL https://rpm.nodesource.com/setup_11.x | bash –
yum -y install nodejs
npm install -g npm
Install latest sfdx cli
npm install –global sfdx-cli
Install specific version of sfdx cli
npm install –global sfdx-cli@[version]
Uninstall
npm uninstall –global sfdx-cli
Related posts
- python – Errno 10061 : No connection could be made because the target machine actively refused it ( client – server )
- How do I paste from the clipboard into a Python window?
- Detecting Mouse clicks in windows using python
- python selenium click on button
- javascript – Flask – Calling python function on button OnClick event
- html – python clicking a button on a webpage