在 Windows 10 上安装 eclipse theia 操作步骤笔记(暂未成功,望指教)

安装 scoop

使用 PowerShell 运行如下命令,在默认目录(C:\Users<user>\scoop)安装 scoop

Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')

# 或者简写
iwr -useb get.scoop.sh | iex

也可以在运行上面的安装命令之前,先运行如下命令,通过修改 SCOOP 环境变量,将 scoop 安装到自定义目录

$env:SCOOP='D:\Applications\Scoop'
[Environment]::SetEnvironmentVariable('SCOOP', $env:SCOOP, 'User')
# run the installer

还可以通过修改 SCOOP_GLOBAL 环境变量,将 scoop 安装为全局程序到自定义目录

$env:SCOOP_GLOBAL='F:\GlobalScoopApps'
[Environment]::SetEnvironmentVariable('SCOOP_GLOBAL', $env:SCOOP_GLOBAL, 'Machine')
# run the installer

安装时报错如下

使用“1”个参数调用“DownloadString”时发生异常:“未能解析此远程名称: 'raw.githubusercontent.com'”
所在位置 行:1 字符: 1
+ Invoke-Expression (New-Object System.Net.WebClient).DownloadString('h ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

处理方法

通过浏览器访问 https://get.scoop.sh,会自动跳转到 https://raw.githubusercontent.com/lukesampson/scoop/master/bin/install.ps1,而该跳转地址在本地无法访问

运行 ping 命令

ping raw.githubusercontent.com
Ping 请求找不到主机 raw.githubusercontent.com。请检查该名称,然后重试。

可以看到 DNS 无法解析域名,于是直接修改本地的 hosts 文件

151.101.108.133 raw.githubusercontent.com

再次运行 scoop 安装命令,则安装安装

PS C:\WINDOWS\system32> Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
Initializing...
Downloading scoop...
Extracting...
Creating shim...
Downloading main bucket...
Extracting...
Adding ~\scoop\shims to your path.
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值