Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Unable to Install PowerShell 7.4 with Ubuntu 24.04 #23197

Open
5 tasks done
msJinLei opened this issue May 10, 2024 · 6 comments
Open
5 tasks done

Unable to Install PowerShell 7.4 with Ubuntu 24.04 #23197

msJinLei opened this issue May 10, 2024 · 6 comments
Labels
Needs-Triage The issue is new and needs to be triaged by a work group.

Comments

@msJinLei
Copy link

msJinLei commented May 10, 2024

Prerequisites

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 getty@tty1.service
 systemctl restart networkd-dispatcher.service
 systemctl restart serial-getty@ttyS0.service
 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 getty@tty1.service
 systemctl restart networkd-dispatcher.service
 systemctl restart serial-getty@ttyS0.service
 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

@msJinLei msJinLei added the Needs-Triage The issue is new and needs to be triaged by a work group. label May 10, 2024
@rhubarb-geek-nz
Copy link

#21548
#21385

@briped
Copy link

briped commented May 12, 2024

sudo dpkg --install --ignore-depends=libicu72 powershell_7.4.2-1.deb_amd64.deb

@msJinLei
Copy link
Author

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) ...

@TK1987
Copy link

TK1987 commented May 14, 2024

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> 

@briped
Copy link

briped commented May 14, 2024

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 :)

@TK1987
Copy link

TK1987 commented May 14, 2024

Out of curiosity, how does deb handle the upgrade proces when a "real" new version of libicu72 or libicu74 is 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Triage The issue is new and needs to be triaged by a work group.
Projects
None yet
Development

No branches or pull requests

4 participants