在windows上安装 chocolatey.1.1.0.nupkg

网友投稿 1734 2022-11-10

在windows上安装 chocolatey.1.1.0.nupkg

在windows上安装 chocolatey.1.1.0.nupkg

这几天外网特别不稳定,感觉都快没法编程了。正好昨天又新装了一个操作系统,一大堆软件等着要装。所以本来是个挺顺利的事,非得折腾一圈才能成功。

首先是,官方已经说明了如何安装choco,

​​AllSigned​​

​​或者​​​​Set-ExecutionPolicy Bypass -Scope Process​​

然后再执行下面这个指令就可以了,

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('Forcing web requests to allow TLS v1.2 (Required for requests to Chocolatey.org) Getting latest version of the Chocolatey package for download. Not using proxy. Getting Chocolatey from Downloading to C:\Users\user\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip Not using proxy.

于是到官网-,

​​过程中给出了一长串的信息,留在下面作个备注吧,

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('Forcing web requests to allow TLS v1.2 (Required for requests to Chocolatey.org) Getting latest version of the Chocolatey package for download. Not using proxy. Getting Chocolatey from Downloading to C:\Users\User\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip Not using proxy. Extracting C:\Users\USer\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip to C:\Users\User\AppData\Local\Temp\chocolatey\chocoInstall Installing Chocolatey on the local machine Creating ChocolateyInstall as an environment variable (targeting 'Machine')   Setting ChocolateyInstall to 'C:\ProgramData\chocolatey' WARNING: It's very likely you will need to close and reopen your shell   before you can use choco. Restricting write permissions to Administrators We are setting up the Chocolatey package repository. The packages themselves go to 'C:\ProgramData\chocolatey\lib'   (i.e. C:\ProgramData\chocolatey\lib\yourPackageName). A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin'   and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'.Creating Chocolatey folders if they do not already exist.WARNING: You can safely ignore errors related to missing log files when   upgrading from a version of Chocolatey less than 0.9.9.   'Batch file could not be found' is also safe to ignore.   'The system cannot find the file specified' - also safe. chocolatey.nupkg file not installed in lib.  Attempting to locate it from bootstrapper. PATH environment variable does not have C:\ProgramData\chocolatey\bin in it. Adding... 警告: Not setting tab completion: Profile file does not exist at 'C:\Users\User\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'. Chocolatey (choco.exe) is now ready. You can call choco from anywhere, command line or powershell by typing choco. Run choco /? for a list of functions. You may need to shut down and restart powershell and/or consoles  first prior to using choco. Ensuring Chocolatey commands are on the path Ensuring chocolatey.nupkg is in the lib folder

安装完成后,可执行文件的路径在这里,

C:\ProgramData\chocolatey\bin

可以检查一下是否已经添加到系统 环境变量中了 ,如果没有的话,可能安装过程中出了问题,需要手动设置一下即可。

本文结束。

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:深入了解Hadoop如何实现序列化
下一篇:Linux内核编译输出到指定目录
相关文章

 发表评论

暂时没有评论,来抢沙发吧~