Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Installing PowerShell on Debian Linux (🚩🇨🇳🏹红旗中科 RedFlag Linux (🍥Debian 11)) #159194

Closed
englianhu opened this issue Aug 25, 2022 · 1 comment

Comments

@englianhu
Copy link

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.70.2
  • OS Version: RedFlag Desktop 11.0 (Debian 11)
## VS Code Version
code --version
1.70.2
e4503b30fc78200f846c62cf8091b76ff5547662
x64

scibrokes/owner#4

## OS Version
lsb_release -a
No LSB modules are available.
Distributor ID: Redflag
Description:    RedFlag Desktop 11.0
Release:        11.0
Codename:       Kunlun

Steps to Reproduce:

# Install system components
sudo apt update  && sudo apt install -y curl gnupg apt-transport-https

# Import the public repository GPG keys
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

# Register the Microsoft Product feed
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye main" > /etc/apt/sources.list.d/microsoft.list'

# Install PowerShell
sudo apt update && sudo apt install -y powershell

# Start PowerShell
pwsh

Tried above but shows error as below...

englianhu@Scibrokes:~$ # Install system components
englianhu@Scibrokes:~$ sudo apt update  && sudo apt install -y curl gnupg apt-transport-https
获取:1 http://packages.microsoft.com/repos/code stable InRelease [10.4 kB]   
获取:2 http://packages.microsoft.com/repos/code stable/main armhf Packages [104 kB]
获取:3 http://packages.microsoft.com/repos/code stable/main arm64 Packages [104 kB]
获取:4 http://packages.microsoft.com/repos/code stable/main amd64 Packages [103 kB]
忽略:5 http://apt.keepsolid.com/RedFlag Kunlun InRelease                     
命中:6 http://cloud.r-project.org/bin/linux/debian buster-cran40/ InRelease  
命中:7 http://apt.chinaredflag.cn/kunlun-amd64 kunlun InRelease              
忽略:8 http://apt.keepsolid.com/RedFlag Kunlun Release                       
忽略:9 http://apt.keepsolid.com/RedFlag Kunlun/main all Packages             
获取:10 https://deb.debian.org/debian buster-backports InRelease [51.4 kB]   
命中:11 https://mirrors.bfsu.edu.cn/debian buster InRelease               
忽略:12 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 Packages
忽略:13 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh
忽略:14 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh_CN
忽略:15 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-en
忽略:16 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 DEP-11 Metadata
忽略:17 http://apt.keepsolid.com/RedFlag Kunlun/main all DEP-11 Metadata
忽略:18 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 48x48 Icons
忽略:19 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 64x64 Icons
忽略:20 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 128x128 Icons    
忽略:9 http://apt.keepsolid.com/RedFlag Kunlun/main all Packages             
忽略:12 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 Packages          
忽略:13 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh          
忽略:14 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh_CN       
忽略:15 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-en          
忽略:16 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 DEP-11 Metadata   
忽略:17 http://apt.keepsolid.com/RedFlag Kunlun/main all DEP-11 Metadata     
忽略:18 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 48x48 Icons      
忽略:19 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 64x64 Icons      
忽略:20 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 128x128 Icons    
忽略:9 http://apt.keepsolid.com/RedFlag Kunlun/main all Packages             
忽略:12 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 Packages          
忽略:13 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh          
忽略:14 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh_CN       
忽略:15 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-en          
忽略:16 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 DEP-11 Metadata   
忽略:17 http://apt.keepsolid.com/RedFlag Kunlun/main all DEP-11 Metadata     
忽略:18 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 48x48 Icons      
忽略:19 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 64x64 Icons      
忽略:20 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 128x128 Icons    
忽略:9 http://apt.keepsolid.com/RedFlag Kunlun/main all Packages             
忽略:12 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 Packages          
忽略:13 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh
忽略:14 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh_CN
忽略:15 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-en
忽略:16 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 DEP-11 Metadata
忽略:17 http://apt.keepsolid.com/RedFlag Kunlun/main all DEP-11 Metadata
忽略:18 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 48x48 Icons
忽略:19 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 64x64 Icons
忽略:20 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 128x128 Icons
忽略:9 http://apt.keepsolid.com/RedFlag Kunlun/main all Packages
忽略:12 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 Packages
忽略:13 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh
忽略:14 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh_CN
忽略:15 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-en
忽略:16 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 DEP-11 Metadata
忽略:17 http://apt.keepsolid.com/RedFlag Kunlun/main all DEP-11 Metadata
忽略:18 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 48x48 Icons
忽略:19 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 64x64 Icons
忽略:20 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 128x128 Icons
忽略:9 http://apt.keepsolid.com/RedFlag Kunlun/main all Packages
忽略:12 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 Packages
忽略:13 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh
忽略:14 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh_CN
忽略:15 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-en
忽略:16 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 DEP-11 Metadata
忽略:17 http://apt.keepsolid.com/RedFlag Kunlun/main all DEP-11 Metadata
忽略:18 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 48x48 Icons
忽略:19 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 64x64 Icons
忽略:20 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 128x128 Icons
忽略:9 http://apt.keepsolid.com/RedFlag Kunlun/main all Packages
错误:12 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 Packages
  404  Not Found [IP: 144.217.71.199 80]
忽略:13 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh
忽略:14 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh_CN
忽略:15 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-en
忽略:16 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 DEP-11 Metadata
忽略:17 http://apt.keepsolid.com/RedFlag Kunlun/main all DEP-11 Metadata
忽略:18 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 48x48 Icons
忽略:19 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 64x64 Icons
忽略:20 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 128x128 Icons
已下载 373 kB,耗时 35秒 (10.7 kB/s)
正在读取软件包列表... 完成
W: 仓库 “http://apt.keepsolid.com/RedFlag Kunlun Release” 没有 Release 文件。
N: 无法认证来自该源的数据,所以使用它会带来潜在风险。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
E: 无法下载 http://apt.keepsolid.com/RedFlag/dists/Kunlun/main/binary-amd64/Packages  404  Not Found [IP: 144.217.71.199 80]
E: 部分索引文件下载失败。如果忽略它们,那将转而使用旧的索引文件。
englianhu@Scibrokes:~$ 
englianhu@Scibrokes:~$ # Import the public repository GPG keys
englianhu@Scibrokes:~$ curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   983  100   983    0     0     64      0  0:00:15  0:00:15 --:--:--   254
OK
englianhu@Scibrokes:~$ 
englianhu@Scibrokes:~$ # Register the Microsoft Product feed
englianhu@Scibrokes:~$ sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye main" > /etc/apt/sources.list.d/microsoft.list'
englianhu@Scibrokes:~$ 
englianhu@Scibrokes:~$ # Install PowerShell
englianhu@Scibrokes:~$ sudo apt update && sudo apt install -y powershell
命中:1 http://cloud.r-project.org/bin/linux/debian buster-cran40/ InRelease  
命中:2 http://packages.microsoft.com/repos/code stable InRelease             
命中:3 https://deb.debian.org/debian buster-backports InRelease              
获取:4 https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye InRelease [10.5 kB]
忽略:5 http://apt.keepsolid.com/RedFlag Kunlun InRelease                     
命中:6 http://apt.chinaredflag.cn/kunlun-amd64 kunlun InRelease              
获取:7 https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye/main amd64 Packages [77.0 kB]
忽略:8 http://apt.keepsolid.com/RedFlag Kunlun Release                       
忽略:9 http://apt.keepsolid.com/RedFlag Kunlun/main all Packages          
忽略:10 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 Packages
忽略:11 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh
命中:12 https://mirrors.bfsu.edu.cn/debian buster InRelease
忽略:13 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh_CN
忽略:14 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-en
忽略:15 http://apt.keepsolid.com/RedFlag Kunlun/main all DEP-11 Metadata
忽略:16 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 DEP-11 Metadata
忽略:17 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 48x48 Icons
忽略:18 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 64x64 Icons
忽略:19 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 128x128 Icons    
忽略:9 http://apt.keepsolid.com/RedFlag Kunlun/main all Packages             
忽略:10 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 Packages          
忽略:11 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh          
忽略:13 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh_CN       
忽略:14 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-en          
忽略:15 http://apt.keepsolid.com/RedFlag Kunlun/main all DEP-11 Metadata     
忽略:16 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 DEP-11 Metadata   
忽略:17 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 48x48 Icons      
忽略:18 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 64x64 Icons      
忽略:19 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 128x128 Icons    
忽略:9 http://apt.keepsolid.com/RedFlag Kunlun/main all Packages             
忽略:10 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 Packages          
忽略:11 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh          
忽略:13 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh_CN       
忽略:14 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-en          
忽略:15 http://apt.keepsolid.com/RedFlag Kunlun/main all DEP-11 Metadata     
忽略:16 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 DEP-11 Metadata   
忽略:17 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 48x48 Icons      
忽略:18 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 64x64 Icons      
忽略:19 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 128x128 Icons    
忽略:9 http://apt.keepsolid.com/RedFlag Kunlun/main all Packages             
忽略:10 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 Packages          
忽略:11 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh          
忽略:13 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh_CN
忽略:14 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-en
忽略:15 http://apt.keepsolid.com/RedFlag Kunlun/main all DEP-11 Metadata
忽略:16 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 DEP-11 Metadata
忽略:17 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 48x48 Icons
忽略:18 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 64x64 Icons
忽略:19 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 128x128 Icons
忽略:9 http://apt.keepsolid.com/RedFlag Kunlun/main all Packages
忽略:10 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 Packages
忽略:11 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh
忽略:13 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh_CN
忽略:14 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-en
忽略:15 http://apt.keepsolid.com/RedFlag Kunlun/main all DEP-11 Metadata
忽略:16 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 DEP-11 Metadata
忽略:17 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 48x48 Icons
忽略:18 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 64x64 Icons
忽略:19 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 128x128 Icons
忽略:9 http://apt.keepsolid.com/RedFlag Kunlun/main all Packages
忽略:10 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 Packages
忽略:11 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh
忽略:13 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh_CN
忽略:14 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-en
忽略:15 http://apt.keepsolid.com/RedFlag Kunlun/main all DEP-11 Metadata
忽略:16 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 DEP-11 Metadata
忽略:17 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 48x48 Icons
忽略:18 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 64x64 Icons
忽略:19 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 128x128 Icons
忽略:9 http://apt.keepsolid.com/RedFlag Kunlun/main all Packages
错误:10 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 Packages
  404  Not Found [IP: 144.217.71.199 80]
忽略:11 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh
忽略:13 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-zh_CN
忽略:14 http://apt.keepsolid.com/RedFlag Kunlun/main Translation-en
忽略:15 http://apt.keepsolid.com/RedFlag Kunlun/main all DEP-11 Metadata
忽略:16 http://apt.keepsolid.com/RedFlag Kunlun/main amd64 DEP-11 Metadata
忽略:17 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 48x48 Icons
忽略:18 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 64x64 Icons
忽略:19 http://apt.keepsolid.com/RedFlag Kunlun/main DEP-11 128x128 Icons
已下载 87.5 kB,耗时 34秒 (2,538 B/s)
正在读取软件包列表... 完成
W: 仓库 “http://apt.keepsolid.com/RedFlag Kunlun Release” 没有 Release 文件。
N: 无法认证来自该源的数据,所以使用它会带来潜在风险。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
E: 无法下载 http://apt.keepsolid.com/RedFlag/dists/Kunlun/main/binary-amd64/Packages  404  Not Found [IP: 144.217.71.199 80]
E: 部分索引文件下载失败。如果忽略它们,那将转而使用旧的索引文件。
englianhu@Scibrokes:~$ 
englianhu@Scibrokes:~$ # Start PowerShell
englianhu@Scibrokes:~$ pwsh
bash: pwsh:未找到命令

Reference :

@englianhu
Copy link
Author

englianhu commented Aug 25, 2022

Installation via direct download

PowerShell 7.2 introduced a universal package that makes installation easier. Download the universal package from the releases page onto the Debian 10 machine. The link to the current version is:

There has latest release version via https://github.com/PowerShell/PowerShell/releases.

wget https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell-lts_7.2.6-1.deb_amd64.deb
sudo gdebi powershell-lts_7.2.6-1.deb_amd64.deb
englianhu@Scibrokes:~$ pwsh
PowerShell 7.2.6
Copyright (c) Microsoft Corporation.

https://aka.ms/powershell
Type 'help' to get help.

PS /home/englianhu> exit
englianhu@Scibrokes:~$

Reference:

@englianhu englianhu changed the title Installing PowerShell on Debian Linux (🚩Redflag) Installing PowerShell on Debian Linux (🚩🇨🇳🏹红旗中科 RedFlag Linux (🍥Debian 11)) Aug 29, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2022
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant