PowerShell
PowerShell copied to clipboard
Unable to Install PowerShell 7.4 with Ubuntu 24.04
Prerequisites
- [X] Write a descriptive title.
- [X] Make sure you are able to repro it on the latest released version
- [X] Search the existing issues.
- [X] Refer to the FAQ.
- [X] Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
Installation via Package Repository the Package Repository
# Update the list of packages
sudo apt-get update
# Install pre-requisite packages.
sudo apt-get install -y wget apt-transport-https software-properties-common
# Get the version of Ubuntu
source /etc/os-release
# Download the Microsoft repository keys
wget -q https://packages.microsoft.com/config/ubuntu/$VERSION_ID/packages-microsoft-prod.deb
# Register the Microsoft repository keys
sudo dpkg -i packages-microsoft-prod.deb
# Delete the Microsoft repository keys file
rm packages-microsoft-prod.deb
# Update the list of packages after we added packages.microsoft.com
sudo apt-get update
###################################
# Install PowerShell
sudo apt-get install -y powershell
# Start PowerShell
pwsh
Installation via direct download
# Update the list of packages
sudo apt-get update
# Install pre-requisite packages.
sudo apt-get install -y wget
# Download the PowerShell package file
wget https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/powershell_7.4.2-1.deb_amd64.deb
###################################
# Install the PowerShell package
sudo dpkg -i powershell_7.4.2-1.deb_amd64.deb
# Resolve missing dependencies and finish the install (if necessary)
sudo apt-get install -f
# Delete the downloaded package file
rm powershell_7.4.2-1.deb_amd64.deb
# Start PowerShell Preview
pwsh-lts
Expected behavior
Install PowerShell correctly
Actual behavior
Cannot install PowerShell 7.4
Error details
Friday@BlackFriday:~$ pwd
/home/Friday
Friday@BlackFriday:~$ sudo apt-get update
Get:1 http://azure.archive.ubuntu.com/ubuntu noble InRelease [256 kB]
Get:2 http://azure.archive.ubuntu.com/ubuntu noble-updates InRelease [89.7 kB]
Get:3 http://azure.archive.ubuntu.com/ubuntu noble-backports InRelease [89.7 kB]
Get:4 http://azure.archive.ubuntu.com/ubuntu noble-security InRelease [89.7 kB]
Get:5 http://azure.archive.ubuntu.com/ubuntu noble/main amd64 Packages [1401 kB]
Get:6 http://azure.archive.ubuntu.com/ubuntu noble/main Translation-en [513 kB]
Get:7 http://azure.archive.ubuntu.com/ubuntu noble/universe amd64 Packages [15.0 MB]
Get:8 http://azure.archive.ubuntu.com/ubuntu noble/universe Translation-en [5982 kB]
Get:9 http://azure.archive.ubuntu.com/ubuntu noble/universe amd64 Components [3871 kB]
Get:10 http://azure.archive.ubuntu.com/ubuntu noble/universe amd64 c-n-f Metadata [301 kB]
Get:11 http://azure.archive.ubuntu.com/ubuntu noble/restricted amd64 Packages [93.9 kB]
Get:12 http://azure.archive.ubuntu.com/ubuntu noble/restricted Translation-en [18.7 kB]
Get:13 http://azure.archive.ubuntu.com/ubuntu noble/multiverse amd64 Packages [269 kB]
Get:14 http://azure.archive.ubuntu.com/ubuntu noble/multiverse Translation-en [118 kB]
Get:15 http://azure.archive.ubuntu.com/ubuntu noble/multiverse amd64 Components [35.0 kB]
Get:16 http://azure.archive.ubuntu.com/ubuntu noble/multiverse amd64 c-n-f Metadata [8328 B]
Get:17 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [28.4 kB]
Get:18 http://azure.archive.ubuntu.com/ubuntu noble-updates/main Translation-en [8996 B]
Get:19 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [17.6 kB]
Get:20 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe Translation-en [6096 B]
Get:21 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe amd64 c-n-f Metadata [112 B]
Get:22 http://azure.archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 c-n-f Metadata [116 B]
Get:23 http://azure.archive.ubuntu.com/ubuntu noble-backports/main amd64 c-n-f Metadata [112 B]
Get:24 http://azure.archive.ubuntu.com/ubuntu noble-backports/universe amd64 Packages [3936 B]
Get:25 http://azure.archive.ubuntu.com/ubuntu noble-backports/universe Translation-en [1392 B]
Get:26 http://azure.archive.ubuntu.com/ubuntu noble-backports/universe amd64 c-n-f Metadata [116 B]
Get:27 http://azure.archive.ubuntu.com/ubuntu noble-backports/restricted amd64 c-n-f Metadata [116 B]
Get:28 http://azure.archive.ubuntu.com/ubuntu noble-backports/multiverse amd64 c-n-f Metadata [116 B]
Get:29 http://azure.archive.ubuntu.com/ubuntu noble-security/main amd64 Packages [26.7 kB]
Get:30 http://azure.archive.ubuntu.com/ubuntu noble-security/main Translation-en [8124 B]
Get:31 http://azure.archive.ubuntu.com/ubuntu noble-security/universe amd64 Packages [10.6 kB]
Get:32 http://azure.archive.ubuntu.com/ubuntu noble-security/universe Translation-en [4596 B]
Get:33 http://azure.archive.ubuntu.com/ubuntu noble-security/universe amd64 c-n-f Metadata [112 B]
Get:34 http://azure.archive.ubuntu.com/ubuntu noble-security/multiverse amd64 c-n-f Metadata [116 B]
Hit:35 https://esm.ubuntu.com/apps/ubuntu noble-apps-security InRelease
Hit:36 https://esm.ubuntu.com/infra/ubuntu noble-infra-security InRelease
Fetched 28.3 MB in 5s (6136 kB/s)
Reading package lists... Done
Friday@BlackFriday:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
apport apport-core-dump-handler curl distro-info-data gir1.2-glib-2.0 less libc-bin libc-dev-bin libc-devtools libc6 libc6-dev libcurl3t64-gnutls libcurl4t64
libglib2.0-0t64 libglib2.0-bin libglib2.0-data libgnutls30t64 libnghttp2-14 locales python3-apport python3-problem-report
21 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.6 MB of archives.
After this operation, 242 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 libc-devtools amd64 2.39-0ubuntu8.1 [29.3 kB]
Get:2 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 libc6-dev amd64 2.39-0ubuntu8.1 [2124 kB]
Get:3 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 libc-dev-bin amd64 2.39-0ubuntu8.1 [20.4 kB]
Get:4 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 libc6 amd64 2.39-0ubuntu8.1 [3265 kB]
Get:5 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 libc-bin amd64 2.39-0ubuntu8.1 [682 kB]
Get:6 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 python3-problem-report all 2.28.1-0ubuntu3 [23.9 kB]
Get:7 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 python3-apport all 2.28.1-0ubuntu3 [92.1 kB]
Get:8 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 libglib2.0-data all 2.80.0-6ubuntu3.1 [48.4 kB]
Get:9 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 libglib2.0-bin amd64 2.80.0-6ubuntu3.1 [97.9 kB]
Get:10 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 gir1.2-glib-2.0 amd64 2.80.0-6ubuntu3.1 [183 kB]
Get:11 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 libglib2.0-0t64 amd64 2.80.0-6ubuntu3.1 [1546 kB]
Get:12 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 apport-core-dump-handler all 2.28.1-0ubuntu3 [16.9 kB]
Get:13 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 apport all 2.28.1-0ubuntu3 [83.5 kB]
Get:14 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 libgnutls30t64 amd64 3.8.3-1.1ubuntu3.1 [998 kB]
Get:15 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 distro-info-data all 0.60ubuntu0.1 [6514 B]
Get:16 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 less amd64 590-2ubuntu2.1 [142 kB]
Get:17 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 locales all 2.39-0ubuntu8.1 [4234 kB]
Get:18 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 libnghttp2-14 amd64 1.59.0-1ubuntu0.1 [74.3 kB]
Get:19 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 curl amd64 8.5.0-2ubuntu10.1 [227 kB]
Get:20 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 libcurl4t64 amd64 8.5.0-2ubuntu10.1 [341 kB]
Get:21 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 libcurl3t64-gnutls amd64 8.5.0-2ubuntu10.1 [333 kB]
Fetched 14.6 MB in 1s (11.2 MB/s)
Preconfiguring packages ...
(Reading database ... 68620 files and directories currently installed.)
Preparing to unpack .../libc-devtools_2.39-0ubuntu8.1_amd64.deb ...
Unpacking libc-devtools (2.39-0ubuntu8.1) over (2.39-0ubuntu8) ...
Preparing to unpack .../libc6-dev_2.39-0ubuntu8.1_amd64.deb ...
Unpacking libc6-dev:amd64 (2.39-0ubuntu8.1) over (2.39-0ubuntu8) ...
Preparing to unpack .../libc-dev-bin_2.39-0ubuntu8.1_amd64.deb ...
Unpacking libc-dev-bin (2.39-0ubuntu8.1) over (2.39-0ubuntu8) ...
Preparing to unpack .../libc6_2.39-0ubuntu8.1_amd64.deb ...
Unpacking libc6:amd64 (2.39-0ubuntu8.1) over (2.39-0ubuntu8) ...
Setting up libc6:amd64 (2.39-0ubuntu8.1) ...
(Reading database ... 68620 files and directories currently installed.)
Preparing to unpack .../libc-bin_2.39-0ubuntu8.1_amd64.deb ...
Unpacking libc-bin (2.39-0ubuntu8.1) over (2.39-0ubuntu8) ...
Setting up libc-bin (2.39-0ubuntu8.1) ...
(Reading database ... 68620 files and directories currently installed.)
Preparing to unpack .../0-python3-problem-report_2.28.1-0ubuntu3_all.deb ...
Unpacking python3-problem-report (2.28.1-0ubuntu3) over (2.28.1-0ubuntu2) ...
Preparing to unpack .../1-python3-apport_2.28.1-0ubuntu3_all.deb ...
Unpacking python3-apport (2.28.1-0ubuntu3) over (2.28.1-0ubuntu2) ...
Preparing to unpack .../2-libglib2.0-data_2.80.0-6ubuntu3.1_all.deb ...
Unpacking libglib2.0-data (2.80.0-6ubuntu3.1) over (2.80.0-6ubuntu1) ...
Preparing to unpack .../3-libglib2.0-bin_2.80.0-6ubuntu3.1_amd64.deb ...
Unpacking libglib2.0-bin (2.80.0-6ubuntu3.1) over (2.80.0-6ubuntu1) ...
Preparing to unpack .../4-gir1.2-glib-2.0_2.80.0-6ubuntu3.1_amd64.deb ...
Unpacking gir1.2-glib-2.0:amd64 (2.80.0-6ubuntu3.1) over (2.80.0-6ubuntu1) ...
Preparing to unpack .../5-libglib2.0-0t64_2.80.0-6ubuntu3.1_amd64.deb ...
Unpacking libglib2.0-0t64:amd64 (2.80.0-6ubuntu3.1) over (2.80.0-6ubuntu1) ...
Preparing to unpack .../6-apport-core-dump-handler_2.28.1-0ubuntu3_all.deb ...
Unpacking apport-core-dump-handler (2.28.1-0ubuntu3) over (2.28.1-0ubuntu2) ...
Preparing to unpack .../7-apport_2.28.1-0ubuntu3_all.deb ...
Unpacking apport (2.28.1-0ubuntu3) over (2.28.1-0ubuntu2) ...
Preparing to unpack .../8-libgnutls30t64_3.8.3-1.1ubuntu3.1_amd64.deb ...
Unpacking libgnutls30t64:amd64 (3.8.3-1.1ubuntu3.1) over (3.8.3-1.1ubuntu3) ...
Setting up libgnutls30t64:amd64 (3.8.3-1.1ubuntu3.1) ...
(Reading database ... 68622 files and directories currently installed.)
Preparing to unpack .../0-distro-info-data_0.60ubuntu0.1_all.deb ...
Unpacking distro-info-data (0.60ubuntu0.1) over (0.60) ...
Preparing to unpack .../1-less_590-2ubuntu2.1_amd64.deb ...
Unpacking less (590-2ubuntu2.1) over (590-2ubuntu2) ...
Preparing to unpack .../2-locales_2.39-0ubuntu8.1_all.deb ...
Unpacking locales (2.39-0ubuntu8.1) over (2.39-0ubuntu8) ...
Preparing to unpack .../3-libnghttp2-14_1.59.0-1ubuntu0.1_amd64.deb ...
Unpacking libnghttp2-14:amd64 (1.59.0-1ubuntu0.1) over (1.59.0-1build4) ...
Preparing to unpack .../4-curl_8.5.0-2ubuntu10.1_amd64.deb ...
Unpacking curl (8.5.0-2ubuntu10.1) over (8.5.0-2ubuntu10) ...
Preparing to unpack .../5-libcurl4t64_8.5.0-2ubuntu10.1_amd64.deb ...
Unpacking libcurl4t64:amd64 (8.5.0-2ubuntu10.1) over (8.5.0-2ubuntu10) ...
Preparing to unpack .../6-libcurl3t64-gnutls_8.5.0-2ubuntu10.1_amd64.deb ...
Unpacking libcurl3t64-gnutls:amd64 (8.5.0-2ubuntu10.1) over (8.5.0-2ubuntu10) ...
Setting up python3-problem-report (2.28.1-0ubuntu3) ...
Setting up distro-info-data (0.60ubuntu0.1) ...
Setting up libnghttp2-14:amd64 (1.59.0-1ubuntu0.1) ...
Setting up libcurl3t64-gnutls:amd64 (8.5.0-2ubuntu10.1) ...
Setting up less (590-2ubuntu2.1) ...
Setting up locales (2.39-0ubuntu8.1) ...
Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete.
Setting up python3-apport (2.28.1-0ubuntu3) ...
Setting up libglib2.0-0t64:amd64 (2.80.0-6ubuntu3.1) ...
No schema files found: doing nothing.
Setting up libglib2.0-data (2.80.0-6ubuntu3.1) ...
Setting up gir1.2-glib-2.0:amd64 (2.80.0-6ubuntu3.1) ...
Setting up libc-dev-bin (2.39-0ubuntu8.1) ...
Setting up libc-devtools (2.39-0ubuntu8.1) ...
Setting up libcurl4t64:amd64 (8.5.0-2ubuntu10.1) ...
Setting up libglib2.0-bin (2.80.0-6ubuntu3.1) ...
Setting up libc6-dev:amd64 (2.39-0ubuntu8.1) ...
Setting up curl (8.5.0-2ubuntu10.1) ...
Setting up apport-core-dump-handler (2.28.1-0ubuntu3) ...
Setting up apport (2.28.1-0ubuntu3) ...
apport-autoreport.service is a disabled or a static unit not running, not starting it.
Processing triggers for libc-bin (2.39-0ubuntu8.1) ...
Processing triggers for man-db (2.12.0-4build2) ...
Scanning processes...
Scanning candidates...
Scanning linux images...
Running kernel seems to be up-to-date.
Restarting services...
systemctl restart chrony.service cron.service hv-kvp-daemon.service multipathd.service packagekit.service polkit.service rsyslog.service snapd.service ssh.service systemd-journald.service systemd-networkd.service systemd-resolved.service systemd-udevd.service udisks2.service walinuxagent.service
Job for chrony.service failed because the control process exited with error code.
See "systemctl status chrony.service" and "journalctl -xeu chrony.service" for details.
Service restarts being deferred:
systemctl restart ModemManager.service
/etc/needrestart/restart.d/dbus.service
systemctl restart [email protected]
systemctl restart networkd-dispatcher.service
systemctl restart [email protected]
systemctl restart systemd-logind.service
systemctl restart unattended-upgrades.service
No containers need to be restarted.
User sessions running outdated binaries:
Friday @ session #1: sshd[3076,3352]
Friday @ session #3: sshd[3087,3351]
Friday @ user manager service: systemd[3081]
No VM guests are running outdated hypervisor (qemu) binaries on this host.
Friday@BlackFriday:~$ sudo apt-get install -y wget apt-transport-https software-properties-common
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
wget is already the newest version (1.21.4-1ubuntu4).
wget set to manually installed.
software-properties-common is already the newest version (0.99.48).
software-properties-common set to manually installed.
The following NEW packages will be installed:
apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 3974 B of archives.
After this operation, 35.8 kB of additional disk space will be used.
Get:1 http://azure.archive.ubuntu.com/ubuntu noble/universe amd64 apt-transport-https all 2.7.14build2 [3974 B]
Fetched 3974 B in 0s (14.6 kB/s)
Selecting previously unselected package apt-transport-https.
(Reading database ... 68622 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_2.7.14build2_all.deb ...
Unpacking apt-transport-https (2.7.14build2) ...
Setting up apt-transport-https (2.7.14build2) ...
Scanning processes...
Scanning candidates...
Scanning linux images...
Running kernel seems to be up-to-date.
Restarting services...
Service restarts being deferred:
/etc/needrestart/restart.d/dbus.service
systemctl restart [email protected]
systemctl restart networkd-dispatcher.service
systemctl restart [email protected]
systemctl restart systemd-logind.service
systemctl restart unattended-upgrades.service
No containers need to be restarted.
User sessions running outdated binaries:
Friday @ session #1: sshd[3076,3352]
Friday @ session #3: sshd[3087,3351]
Friday @ user manager service: systemd[3081]
No VM guests are running outdated hypervisor (qemu) binaries on this host.
Friday@BlackFriday:~$ source /etc/os-release
Friday@BlackFriday:~$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
Friday@BlackFriday:~$ wget -q https://packages.microsoft.com/config/ubuntu/$VERSION_ID/packages-microsoft-prod.deb
Friday@BlackFriday:~$ wget -q https://packages.microsoft.com/config/ubuntu/$VERSION_ID/packages-microsoft-prod.deb
Friday@BlackFriday:~$ ls -al
total 44
drwxr-x--- 4 Friday Friday 4096 May 10 04:14 .
drwxr-xr-x 3 root root 4096 May 10 04:09 ..
-rw------- 1 Friday Friday 57 May 10 04:12 .Xauthority
-rw-r--r-- 1 Friday Friday 220 Mar 31 08:41 .bash_logout
-rw-r--r-- 1 Friday Friday 3771 Mar 31 08:41 .bashrc
drwx------ 2 Friday Friday 4096 May 10 04:12 .cache
-rw-r--r-- 1 Friday Friday 807 Mar 31 08:41 .profile
drwx------ 2 Friday Friday 4096 May 10 04:09 .ssh
-rw-r--r-- 1 Friday Friday 0 May 10 04:12 .sudo_as_admin_successful
-rw-rw-r-- 1 Friday Friday 177 May 10 04:14 .wget-hsts
-rw-rw-r-- 1 Friday Friday 4298 Mar 13 18:16 packages-microsoft-prod.deb
Friday@BlackFriday:~$ sudo dpkg -i packages-microsoft-prod.deb
Selecting previously unselected package packages-microsoft-prod.
(Reading database ... 68626 files and directories currently installed.)
Preparing to unpack packages-microsoft-prod.deb ...
Unpacking packages-microsoft-prod (1.1-ubuntu24.04) ...
Setting up packages-microsoft-prod (1.1-ubuntu24.04) ...
Friday@BlackFriday:~$ sudo apt-get install -y powershell
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package powershell
Friday@BlackFriday:~$ sudo apt-get update
Hit:1 http://azure.archive.ubuntu.com/ubuntu noble InRelease
Hit:2 http://azure.archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:3 http://azure.archive.ubuntu.com/ubuntu noble-backports InRelease
Hit:4 http://azure.archive.ubuntu.com/ubuntu noble-security InRelease
Get:5 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease [3600 B]
Get:6 https://packages.microsoft.com/ubuntu/24.04/prod noble/main arm64 Packages [2534 B]
Get:7 https://packages.microsoft.com/ubuntu/24.04/prod noble/main all Packages [344 B]
Get:8 https://packages.microsoft.com/ubuntu/24.04/prod noble/main amd64 Packages [2775 B]
Get:9 https://packages.microsoft.com/ubuntu/24.04/prod noble/main armhf Packages [2339 B]
Hit:10 https://esm.ubuntu.com/apps/ubuntu noble-apps-security InRelease
Hit:11 https://esm.ubuntu.com/infra/ubuntu noble-infra-security InRelease
Fetched 11.6 kB in 2s (6976 B/s)
Reading package lists... Done
Friday@BlackFriday:~$ sudo apt-get install -y powershell
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package powershell
Friday@BlackFriday:~$ wget https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/powershell_7.4.2-1.deb_amd64.deb
--2024-05-10 04:17:53-- https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/powershell_7.4.2-1.deb_amd64.deb
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/49609581/bfcdab92-62e5-40e5-bfe0-219986070d73?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240510%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240510T041753Z&X-Amz-Expires=300&X-Amz-Signature=28d752431e346f991372e50228b0ebf971d21eb471b2c69ebdc206a1c4e6150b&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=49609581&response-content-disposition=attachment%3B%20filename%3Dpowershell_7.4.2-1.deb_amd64.deb&response-content-type=application%2Foctet-stream [following]
--2024-05-10 04:17:54-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/49609581/bfcdab92-62e5-40e5-bfe0-219986070d73?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240510%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240510T041753Z&X-Amz-Expires=300&X-Amz-Signature=28d752431e346f991372e50228b0ebf971d21eb471b2c69ebdc206a1c4e6150b&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=49609581&response-content-disposition=attachment%3B%20filename%3Dpowershell_7.4.2-1.deb_amd64.deb&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.110.133, 185.199.109.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 71064830 (68M) [application/octet-stream]
Saving to: powershell_7.4.2-1.deb_amd64.deb
powershell_7.4.2-1.deb_amd64.deb 100%[=========================================================================================>] 67.77M 15.7MB/s in 4.3s
2024-05-10 04:17:59 (15.6 MB/s) - powershell_7.4.2-1.deb_amd64.deb saved [71064830/71064830]
Friday@BlackFriday:~$ sudo dpkg -i powershell_7.4.2-1.deb_amd64.deb
Selecting previously unselected package powershell.
(Reading database ... 68643 files and directories currently installed.)
Preparing to unpack powershell_7.4.2-1.deb_amd64.deb ...
Unpacking powershell (7.4.2-1.deb) ...
dpkg: dependency problems prevent configuration of powershell:
powershell depends on libicu72 | libicu71 | libicu70 | libicu69 | libicu68 | libicu67 | libicu66 | libicu65 | libicu63 | libicu60 | libicu57 | libicu55 | libicu52; however:
Package libicu72 is not installed.
Package libicu71 is not installed.
Package libicu70 is not installed.
Package libicu69 is not installed.
Package libicu68 is not installed.
Package libicu67 is not installed.
Package libicu66 is not installed.
Package libicu65 is not installed.
Package libicu63 is not installed.
Package libicu60 is not installed.
Package libicu57 is not installed.
Package libicu55 is not installed.
Package libicu52 is not installed.
dpkg: error processing package powershell (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.12.0-4build2) ...
Errors were encountered while processing:
powershell
Friday@BlackFriday:~$
Environment data
Friday@BlackFriday:~$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
Visuals
No response
https://github.com/PowerShell/PowerShell/issues/21548 https://github.com/PowerShell/PowerShell/issues/21385
sudo dpkg --install --ignore-depends=libicu72 powershell_7.4.2-1.deb_amd64.deb
sudo apt-get install -f
Thanks, but doesn't work
Friday@BlackFriday:~$ sudo dpkg --install --ignore-depends=libicu72 powershell_7.4.2-1.deb_amd64.deb
(Reading database ... 69318 files and directories currently installed.)
Preparing to unpack powershell_7.4.2-1.deb_amd64.deb ...
Unpacking powershell (7.4.2-1.deb) over (7.4.2-1.deb) ...
Setting up powershell (7.4.2-1.deb) ...
Processing triggers for man-db (2.12.0-4build2) ...
sudo dpkg --install --ignore-depends=libicu72 powershell_7.4.2-1.deb_amd64.deb
Doesn't this lead to problems because the dependent package is missing?
Perhaps a better option would be to create a dummy package that uses the newer version instead...
thomas@mate:~$ sudo apt install -y equivs
thomas@mate:~$ equivs-control libicu72
thomas@mate:~$ nano libicu72
Section: misc
Priority: optional
Package: libicu72
Provides: libicu74
Architecture: all
Description: Dummy package for PowerShell
thomas@mate:~$ equivs-build libicu72
dpkg-buildpackage: info: source package libicu72
dpkg-buildpackage: info: source version 1.0
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Equivs Dummy Package Generator <thomas@mate>
dpkg-buildpackage: info: host architecture amd64
dpkg-source --before-build .
debian/rules clean
dh clean
dh_clean
debian/rules binary
dh binary
dh_update_autotools_config
dh_autoreconf
create-stamp debian/debhelper-build-stamp
dh_prep
dh_auto_install --destdir=debian/libicu72/
dh_install
dh_installdocs
dh_installchangelogs
dh_perl
dh_link
dh_strip_nondeterminism
dh_compress
dh_fixperms
dh_missing
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package 'libicu72' in '../libicu72_1.0_all.deb'.
dpkg-genbuildinfo --build=binary -O../libicu72_1.0_amd64.buildinfo
dpkg-genchanges --build=binary -O../libicu72_1.0_amd64.changes
dpkg-genchanges: info: binary-only upload (no source code included)
dpkg-source --after-build .
dpkg-buildpackage: info: binary-only upload (no source included)
The package has been created.
Attention, the package has been created in the current directory,
not in ".." as indicated by the message above!
thomas@mate:~$ sudo dpkg -i libicu72_1.0_all.deb
(Reading database ... 276606 files and directories currently installed.)
Preparing to unpack libicu72_1.0_all.deb ...
Unpacking libicu72 (1.0) over (1.0) ...
Setting up libicu72 (1.0) ...
thomas@mate:~$ sudo apt install -y /tmp/powershell-lts_7.4.2-1.deb_amd64.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'powershell-lts' instead of '/tmp/powershell-lts_7.4.2-1.deb_amd64.deb'
The following NEW packages will be installed:
powershell-lts
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/71,1 MB of archives.
After this operation, 181 MB of additional disk space will be used.
Get:1 /tmp/powershell-lts_7.4.2-1.deb_amd64.deb powershell-lts amd64 7.4.2-1.deb [71,1 MB]
Selecting previously unselected package powershell-lts.
(Reading database ... 275936 files and directories currently installed.)
Preparing to unpack .../powershell-lts_7.4.2-1.deb_amd64.deb ...
Unpacking powershell-lts (7.4.2-1.deb) ...
Setting up powershell-lts (7.4.2-1.deb) ...
Processing triggers for man-db (2.12.0-4build2) ...
thomas@mate:~$ pwsh
PowerShell 7.4.2
PS /home/thomas>
Doesn't this lead to problems because the dependent package is missing?
Perhaps a better option would be to create a dummy package that uses the newer version instead...
You're right. At least further use of apt wouldn't really work until I did the cleaning up it told me to do, which uninstalled powershell again (forgot the command).
I don't really know that much about apt/dpkg, so I just perused man dpkg for a way to in some way ignore / override the dependency, and it worked; PowerShell was installed. Although the succes was short-lived, as apt just complained afterwards.
Out of curiosity, how does deb handle the upgrade proces when a "real" new version of libicu72 or libicu74 is available?
And thank you for your solution/workaround :)
Out of curiosity, how does deb handle the upgrade proces when a "real" new version of
libicu72orlibicu74is available?
libicu74 is already a real version currently used by Noble Numbat. The dummy package libicu72 only redirects everything to this package.
As soon as Powershell is officially released for Noble, it will also use version >=74. The dummy package will then be obsolete. However, it will remain in the system until it is manually uninstalled.
Issue is on our backlog - we plan to address in the near future. #21385
sudo dpkg --install --ignore-depends=libicu72 powershell_7.4.2-1.deb_amd64.debDoesn't this lead to problems because the dependent package is missing?
Perhaps a better option would be to create a dummy package that uses the newer version instead...
thomas@mate:~$ sudo apt install -y equivs thomas@mate:~$ equivs-control libicu72 thomas@mate:~$ nano libicu72Section: misc Priority: optional Package: libicu72 Provides: libicu74 Architecture: all Description: Dummy package for PowerShellthomas@mate:~$ equivs-build libicu72 dpkg-buildpackage: info: source package libicu72 dpkg-buildpackage: info: source version 1.0 dpkg-buildpackage: info: source distribution unstable dpkg-buildpackage: info: source changed by Equivs Dummy Package Generator <thomas@mate> dpkg-buildpackage: info: host architecture amd64 dpkg-source --before-build . debian/rules clean dh clean dh_clean debian/rules binary dh binary dh_update_autotools_config dh_autoreconf create-stamp debian/debhelper-build-stamp dh_prep dh_auto_install --destdir=debian/libicu72/ dh_install dh_installdocs dh_installchangelogs dh_perl dh_link dh_strip_nondeterminism dh_compress dh_fixperms dh_missing dh_installdeb dh_gencontrol dh_md5sums dh_builddeb dpkg-deb: building package 'libicu72' in '../libicu72_1.0_all.deb'. dpkg-genbuildinfo --build=binary -O../libicu72_1.0_amd64.buildinfo dpkg-genchanges --build=binary -O../libicu72_1.0_amd64.changes dpkg-genchanges: info: binary-only upload (no source code included) dpkg-source --after-build . dpkg-buildpackage: info: binary-only upload (no source included) The package has been created. Attention, the package has been created in the current directory, not in ".." as indicated by the message above! thomas@mate:~$ sudo dpkg -i libicu72_1.0_all.deb (Reading database ... 276606 files and directories currently installed.) Preparing to unpack libicu72_1.0_all.deb ... Unpacking libicu72 (1.0) over (1.0) ... Setting up libicu72 (1.0) ... thomas@mate:~$ sudo apt install -y /tmp/powershell-lts_7.4.2-1.deb_amd64.deb Reading package lists... Done Building dependency tree... Done Reading state information... Done Note, selecting 'powershell-lts' instead of '/tmp/powershell-lts_7.4.2-1.deb_amd64.deb' The following NEW packages will be installed: powershell-lts 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/71,1 MB of archives. After this operation, 181 MB of additional disk space will be used. Get:1 /tmp/powershell-lts_7.4.2-1.deb_amd64.deb powershell-lts amd64 7.4.2-1.deb [71,1 MB] Selecting previously unselected package powershell-lts. (Reading database ... 275936 files and directories currently installed.) Preparing to unpack .../powershell-lts_7.4.2-1.deb_amd64.deb ... Unpacking powershell-lts (7.4.2-1.deb) ... Setting up powershell-lts (7.4.2-1.deb) ... Processing triggers for man-db (2.12.0-4build2) ... thomas@mate:~$ pwsh PowerShell 7.4.2 PS /home/thomas>
This is a good workaround indeed BUT it installs unnecessary equivs package: here is a more easy-workaround that will install the Debian package Libicu72 from Mantic and resolve the issue:
First download the Ubuntu Manitc package for libicu72 from this link:
https://mirror.it.ubc.ca/ubuntu/pool/main/i/icu/
Steps to run :
$ sudo apt get update
$ wget https://mirror.it.ubc.ca/ubuntu/pool/main/i/icu/libicu72_72.1-3ubuntu3_amd64.deb
$ sudo dpkg -i libicu72_72.1-3ubuntu3_amd64.deb
$ wget https://github.com/PowerShell/PowerShell/releases/download/v7.4.3/powershell_7.4.3-1.deb_amd64.deb
$ sudo dpkg -i powershell_7.4.3-1.deb_amd64.deb
$ pwsh
Final Output:
PowerShell 7.4.3
PS /home/
Issue is on our backlog - we plan to address in the near future. #21385
That link doesn't work for me but still, I don't get it. You are in bed with canonical for years and you know when the LTS releases. Why is there no support on day one and it takes more than 3months to get it working without dependency workarounds? This is kind of support is abysmal, but I guess it is not that surprising considering https://github.com/PowerShell/PowerShell/issues/2996 still is not fixed after 7years.
My workaround to unresolved libicu72 dependency was to download and install the latest stable libicu72 package for Debian 12 "bookworm" https://packages.debian.org/bookworm/amd64/libicu72/download
Pick your mirror, wget the file, in my case it was libicu72_72.1-3_amd64.deb, and install with
dpkg -i libicu72_72.1-3_amd64.deb
Then continue installing PowerShell.
But like others have stated, workaround like this should not be needed in the first place. Please fix.
You can use snap:
snap install powershell --classic
Works well on my Ubuntu 24.04 LTS
My work-around is to update the control file and change the Depends: line to
Depends: libc6, libgcc1, libgssapi-krb5-2, libstdc++6, zlib1g, libicu74, libssl3t64
the only workaround right now is to just download binaries from releases
You can use snap:
snap install powershell --classicWorks well on my Ubuntu 24.04 LTS
tried this today and get the following error
root@OPERATIONS-HQ:/home/smooney# snap install powershell --classic
2024-08-11T15:01:39+01:00 INFO Waiting for automatic snapd restart...
powershell 7.4.4 from Microsoft PowerShell✓ installed
root@OPERATIONS-HQ:/home/smooney#
root@OPERATIONS-HQ:/home/smooney# pwsh
internal error, please report: running "powershell" failed: cannot find installed snap "powershell" at revision 271: missing file /snap/powershell/271/meta/snap.yaml
root@OPERATIONS-HQ:/home/smooney#
If the package is installed manually by downloading it and then the official repository version is fixed and released, will I need to use Apt to uninstall the manually installed version first or would I just be able to do apt install powershell and it would just overwrite it?
I'm wanting to migrate from 23.10 which is now EOL to 24.04 and the only blocker is PowerShell. PowerShell works fine on 23.10 via the 22.04 repos and I can't drop back to 22.04 because I now depend on packages for my Ubuntu VMs that don't exist on 22.04.
I have patched version of 7.4.4 that can be installed on 24.04
This has the depends line changed to
Depends: libc6, libgcc1, libgssapi-krb5-2, libstdc++6, zlib1g, libicu74, libssl3t64
So I did the workaround of using the equivs package to create a libicu72 dummy package that points to libicu74, installed it and then pulled PowerShell from the 22.04 repo, I used the instructions given by @TK1987 to create the dummy package and install it. Once the package was created, I put it on a network share for future use until this issue is resolved.
Then it was a case of using the same install instructions for Ubuntu 22.04, pull the Microsoft Prod DEB file, install it, update APT and then apt install powershell --assume-yes to install PowerShell to the system.
Because I now have the dummy package on a network share, I don't need to install the equivs package in the future, so the VM template I'll build won't have equivs installed. I will agree with the others, the fact that 24.04 released in April and it is now August with no release, is ridiculous given that the only stopper is the install which is fixed by a dummy package.
The libicu74 has still not been added to the dependencies, even in the latest 7.4.5.
Changing the line with the dependencies in the package from:
Depends: libc6, libgcc1, libgssapi-krb5-2, libstdc++6, zlib1g, libicu72|libicu71|libicu70|libicu69|libicu68|libicu67|libicu66|libicu65|libicu63|libicu60|libicu57|libicu55|libicu52, libssl3|libssl1.1|libssl1.0.2|libssl1.0.0
to
Depends: libc6, libgcc1, libgssapi-krb5-2, libstdc++6, zlib1g, libicu74|libicu72|libicu71|libicu70|libicu69|libicu68|libicu67|libicu66|libicu65|libicu63|libicu60|libicu57|libicu55|libicu52, libssl3|libssl1.1|libssl1.0.2|libssl1.0.0
would suffice
I still had an issue with libssl* on Ubuntu 24.04 armhf so had to switch it to libssl3t64
Also the init script fails to setup the correct symbolic links for the ssl library, as an example
$ cd /opt/microsoft/powershell/7
$ find . -type l | xargs ls -ld
lrwxrwxrwx 1 root root 22 Jul 13 03:39 ./libcrypto.so.1.0.0 -> /lib64/libcrypto.so.10
lrwxrwxrwx 1 root root 19 Jul 13 03:39 ./libssl.so.1.0.0 -> /lib64/libssl.so.10
$ ls -l /lib64/libcrypto.so.10
ls: cannot access '/lib64/libcrypto.so.10': No such file or directory
$ ls -l /lib64/libssl.so.10
ls: cannot access '/lib64/libssl.so.10': No such file or directory
My preference would be for Canonical to do their own builds of PowerShell just like they do with the dotnet-runtime/sdk and have them available via their Ubuntu apt repositories.
Then the powershell package could depend on dotnet-runtime-8.0 and not carry the runtime around just like Mariner/cm packages.
I understand that MSFT runs a business here…. that said - LTS24.04.1 release was delayed an additional several weeks for several reasons - which gave MSFT enough [extra] time to address their issues with this install - I was hopeful - and kept my comments to myself - but sadly - still not working post official .1 LTS release (when everyone else expects everything to work mostly). IF powershell core is going to be a statistically significant part of the environment (e.g. Ubuntu LTS for the masses) - which arguably it already is in corporate usage…. please prioritize and fix this install the correct way…
Thank you!
We are now in the middle of September and that August release window has long since passed and you still cannot install PowerShell without the dummy package.
#wickedbruv
you still cannot install PowerShell without the dummy package.
PowerShell is open source so it is possible to build it so that instead of ssl and icu it depends on the Ubuntu provided dotnet-runtime-sdk-8.0, solving all package dependency problems. This is my build of 7.4.5 and script to do so.
you still cannot install PowerShell without the dummy package.
PowerShell is open source so it is possible to build it so that instead of
sslandicuit depends on the Ubuntu provideddotnet-runtime-sdk-8.0, solving all package dependency problems. This is my build of 7.4.5 and script to do so.
Yes and I have used the equivs package to link the missing package to libicu74 but the fact remains, we shouldn’t have to. 24.04 has been out since April, PowerShell works, its just the package installer that is broken. How long does it take a multi-billion dollar corporation to fix a line in a text file to make installing something possible?
How long does it take a multi-billion dollar corporation to fix a line in a text file to make installing something possible?
I would really like Canonical to do the builds themselves and put it in their APT repositories just like they did with dotnet-sdk. Then Canonical would ensure the packaging and dependencies are consistent with Ubuntu, because there doesn't seem to be any interest here.
Have raised Add PowerShell to APT repository with Ubuntu.
I've managed to use this
Snap Package
snap install powershell --classic
Operating System
PRETTY_NAME="Ubuntu 24.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.1 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
This ticket became a competition for users to make package work, while the package still doesn't work on its own, I'm loving it.
Nearly the end of September and still no change, damn Microsoft, this is considerably disappointing.
this solutions was worked well for me ,
###################################
Prerequisites
Update the list of packages
sudo apt-get update wget https://mirror.it.ubc.ca/ubuntu/pool/main/i/icu/libicu72_72.1-3ubuntu3_amd64.deb sudo dpkg -i libicu72_72.1-3ubuntu3_amd64.deb
Install pre-requisite packages.
sudo apt-get install -y wget
Download the PowerShell package file
wget https://github.com/PowerShell/PowerShell/releases/download/v7.4.5/powershell_7.4.5-1.deb_amd64.deb
###################################
Install the PowerShell package
sudo dpkg -i powershell_7.4.5-1.deb_amd64.deb
Resolve missing dependencies and finish the install (if necessary)
sudo apt-get install -f
Delete the downloaded package file
rm powershell_7.4.5-1.deb_amd64.deb
Start PowerShell Preview
pwsh
you will have to install missing library from direct resource
It looks like the Github actions ubuntu-latest image switched to noble this morning (apparently still deploying according to https://github.com/actions/runner-images). Anyone with PowerShell actions in Github runners on ubuntu-latest are likely to fail now due to this ticket...
For anyone coming across this ticket in their searches for their actions:
A temporary workaround for those who don't want to force manually installing (the previous comment here) would be to change the Github runner image to ubuntu-22.04.
From:
jobs:
Run-npm-on-Ubuntu:
name: Run npm on Ubuntu
runs-on: ubuntu-latest
to:
jobs:
Run-npm-on-Ubuntu:
name: Run npm on Ubuntu
runs-on: ubuntu-22.04
GitHub
GitHub Actions runner images. Contribute to actions/runner-images development by creating an account on GitHub.