10000 [DSR] - Ubuntu 24.04 x64 · Issue #21385 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

[DSR] - Ubuntu 24.04 x64 #21385

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

Closed
4 of 14 tasks
theJasonHelmick opened this issue Mar 27, 2024 · 41 comments
Closed
4 of 14 tasks

[DSR] - Ubuntu 24.04 x64 #21385

theJasonHelmick opened this issue Mar 27, 2024 · 41 comments
Labels
Distribution-Request Request for a new distribution support

Comments

@theJasonHelmick
Copy link
Collaborator

Name of the Distribution

Ubuntu

Version of the Distribution

24.04

Package Types

  • Deb
  • RPM
  • Tar.gz
  • Snap - Stop! Please file your issue in PowerShell-Snap instead.

Processor Architecture

x64

.NET Core Support

Distribution Requirements

  • The version of the Distribution is supported for at least one year.
  • The version of the Distribution is not an interim release or equivalent.

Exemption Justification

No response

Progress

For PowerShell Team ONLY

  • Docker image created
  • Docker image published
  • Distribution tested
  • Update packages.microsoft.com deployment
  • Lifecycle updated
  • Documentation Updated
@theJasonHelmick theJasonHelmick added Distribution-Request Request for a new distribution support Needs-Triage The issue is new and needs to be triaged by a work group. labels Mar 27, 2024
@theJasonHelmick theJasonHelmick moved this from Requests to Backlog in Distribution Requests Mar 27, 2024
@kasini3000
Copy link
kasini3000 commented May 9, 2024

dpkg: dependency problems prevent configuration of powershell:
powershell depends on libicu72 | libicu71 | libicu70 | libicu69 | libicu68 | libicu67 | libicu66 | libicu65 | libicu63 | libicu60 | libicu57 | libicu55 | libicu52; however:

Can we increase the libicu dependency to the number 80 (libicu80), or a version for the next 2 years?

@briped
Copy link
briped commented May 12, 2024

Don't use this approach. See following comments.

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

@dixonwille
Copy link
10000 dixonwille commented May 15, 2024

Following assumes curl and jq is installed and is running with root permissions. But I didn't like ignoring the dependency on an internationalization package. Since libicu72 package name has the version in the name, you can install multiple versions of it at the same time. So I just installed libicu72 package before installing powershell.

tmpDir=$(mktemp -d)
curl -sSL 'https://launchpad.net/ubuntu/+archive/primary/+files/libicu72_72.1-3ubuntu3_amd64.deb' -o "$tmpDir/libicu72_72.1-3ubuntu3_amd64.deb"
dpkg -i "$tmpDir"/libicu72_72.1-3ubuntu3_amd64.deb

downloadUrl=$(curl -sSL "https://api.github.com/repos/PowerShell/PowerShell/releases/latest" |
	jq -r '[.assets[] | select(.name | endswith("_amd64.deb")) | .browser_download_url][0]')
curl -sSL "$downloadUrl" -o "$tmpDir/powershell.deb"
dpkg -i "$tmpDir"/powershell.deb

@briped
Copy link
briped commented May 15, 2024

But I didn't like ignoring the dependency on an internationalization package. Since libicu72 package name has the version in the name, you can install multiple versions of it at the same time. So I just installed libicu72 package before installing powershell.

Thank you. my attempt didn't really hold up under scrutiny :) (following apt installs failed because of missing dependencies on powershell).

@erichiller
Copy link

Don't use this approach. See following comments.

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

As noted above --ignore-depends will cause issues and apt-get -f install will try to remove the powershell package.
A hackish fix for this is to remove the dependency on libicu in the deb:

dpkg-deb --extract powershell-lts_7.4.2-1.deb_amd64.deb powershell-lts_7.4.2-1.deb_amd64
dpkg-deb --control powershell-lts_7.4.2-1.deb_amd64.deb powershell-lts_7.4.2-1.deb_amd64/DEBIAN
vim powershell-lts_7.4.2-1.deb_amd64/DEBIAN/control
# remove icu*
dpkg -b powershell-lts_7.4.2-1.deb_amd64/ powershell-lts_7.4.2-1.deb_amd64-fixed.deb
# install
sudo dpkg --install powershell-lts_7.4.2-1.deb_amd64-fixed.deb 

# exits clean:
sudo apt-get -f install

Hope this helps @briped and anyone facing this issue.

@doherty100
Copy link
doherty100 commented Jun 1, 2024

cloud-init installs using apt failing as well, this code works on 22.04:

cloud_config_modules:
  - apt_configure
  - package_update_upgrade_install

apt:
  sources:
    powershell:
      source: 'deb https://packages.microsoft.com/ubuntu/24.04/prod $RELEASE main'
      key: |
        -----BEGIN PGP PUBLIC KEY BLOCK-----
        Version: GnuPG v1.4.7 (GNU/Linux)

        mQENBFYxWIwBCADAKoZhZlJxGNGWzqV+1OG1xiQeoowKhssGAKvd+buXCGISZJwT
        LXZqIcIiLP7pqdcZWtE9bSc7yBY2MalDp9Liu0KekywQ6VVX1T72NPf5Ev6x6DLV
        7aVWsCzUAF+eb7DC9fPuFLEdxmOEYoPjzrQ7cCnSV4JQxAqhU4T6OjbvRazGl3ag
        OeizPXmRljMtUUttHQZnRhtlzkmwIrUivbfFPD+fEoHJ1+uIdfOzZX8/oKHKLe2j
        H632kvsNzJFlROVvGLYAk2WRcLu+RjjggixhwiB+Mu/A8Tf4V6b+YppS44q8EvVr
        M+QvY7LNSOffSO6Slsy9oisGTdfE39nC7pVRABEBAAG0N01pY3Jvc29mdCAoUmVs
        ZWFzZSBzaWduaW5nKSA8Z3Bnc2VjdXJpdHlAbWljcm9zb2Z0LmNvbT6JATUEEwEC
        AB8FAlYxWIwCGwMGCwkIBwMCBBUCCAMDFgIBAh4BAheAAAoJEOs+lK2+EinPGpsH
        /32vKy29Hg51H9dfFJMx0/a/F+5vKeCeVqimvyTM04C+XENNuSbYZ3eRPHGHFLqe
        MNGxsfb7C7ZxEeW7J/vSzRgHxm7ZvESisUYRFq2sgkJ+HFERNrqfci45bdhmrUsy
        7SWw9ybxdFOkuQoyKD3tBmiGfONQMlBaOMWdAsic965rvJsd5zYaZZFI1UwTkFXV
        KJt3bp3Ngn1vEYXwijGTa+FXz6GLHueJwF0I7ug34DgUkAFvAs8Hacr2DRYxL5RJ
        XdNgj4Jd2/g6T9InmWT0hASljur+dJnzNiNCkbn9KbX7J/qK1IbR8y560yRmFsU+
        NdCFTW7wY0Fb1fWJ+/KTsC4=
        =J6gs
        -----END PGP PUBLIC KEY BLOCK-----
      filename: microsoft-prod.list

package_update: true

packages:
  - powershell

package_upgrade: true

package_reboot_if_required: true
sudo apt install powershell
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 powershell : Depends: libicu72 but it is not installable or
                       libicu71 but it is not installable or
                       libicu70 but it is not installable or
                       libicu69 but it is not installable or
                       libicu68 but it is not installable or
                       libicu67 but it is not installable or
                       libicu66 but it is not installable or
                       libicu65 but it is not installable or
                       libicu63 but it is not installable or
                       libicu60 but it is not installable or
                       libicu57 but it is not installable or
                       libicu55 but it is not installable or
                       libicu52 but it is not installable
E: Unable to correct problems, you have held broken packages.

Temp fix is to run this first (thx @dixonwille):

tmpDir=$(mktemp -d)
curl -sSL 'https://launchpad.net/ubuntu/+archive/primary/+files/libicu72_72.1-3ubuntu3_amd64.deb' -o "$tmpDir/libicu72_72.1-3ubuntu3_amd64.deb"
dpkg -i "$tmpDir"/libicu72_72.1-3ubuntu3_amd64.deb

@sc01194
Copy link
sc01194 commented Jun 6, 2024

Hi,
For those who look for a simple workaround install powershell via snap.
This solution was not mentioned in the post or I missed it and for me this was the cleanest and easiest way according to my basic use of powershell.

@stephannn
Copy link

Hi, For those who look for a simple workaround install powershell via snap. This solution was not mentioned in the post or I missed it and for me this was the cleanest and easiest way according to my basic use of powershell.

I don't remember exactly what is was, but I think in the snap version I had an issue with invoke-webrequest or loading certs. That's way I switched to the "normal" version

@doherty100
Copy link

Given APT is the official package manager for Canonical Ubuntu, I am hoping we can get a fix here that enables APT.

@Viajaz
Copy link
Viajaz commented Jun 25, 2024

What is the blocking task here? Is it just libicu?

Without a roadmap, this is starting to make me question whether I can trust Microsoft to support the Ubuntu platform natively for PowerShell and it's starting to affect my choice of PowerShell for projects that need to run on said platform.

@theJasonHelmick
Copy link
Collaborator Author
theJasonHelmick commented Jun 25, 2024

Hey folks! This is top of priority list as we complete some pipeline work for our distro's. This work is currently targeted for release at the end of August. The distro roadmap is a GitHub project board located here: Distribution Requests (view)

@theJasonHelmick theJasonHelmick moved this from Backlog to Planned in Distribution Requests Jun 25, 2024
@RouL
Copy link
RouL commented Jul 7, 2024

Don't get me wrong, I really appreciate the work you do. But having to wait 4 full months for something that people might consider an essential, if they're really using it. That does sound like a too long waiting time, especially if the reason is something minor like in this case. And it's not, that the release of Ubuntu 24.04 came too sudden to anticipate and that testing wasn't possible. :(

@lutopastialis
Copy link

Oh wow, I share @RouL 's feelings. I am a fan of Powershell and became a fan of Ubuntu because of Powershell. I don't want to rant either, but waiting another good one and a half months until it's eventually released at the end of August to be able to install Powershell through APT is throwing off my plans.

For what it's worth, I wish the Powershell guys at Microsoft good luck for finalizing the work for the Ubuntu 24.04 release (fingers crossed).

@notNullThen
Copy link

You can use snap:

snap install powershell --classic

Works well on my Ubuntu 24.04 LTS

@RouL
Copy link
RouL commented Jul 12, 2024

Snaps unfortunately come with their own set of problems. Not a problem when you use FireFox or something as a snap, but things like powershell? No thank you.
Last thing we tried as a snap in the company was ruby. After several hours of frustration, trying to install the gems we did need, we gave up and since then snaps are "banned" from all our company servers.

@lutopastialis
Copy link

@theJasonHelmick how likely do you see this work being completed by the end of August? We're approaching the end of month in a good week and there's still 10 tasks pending. No one is currently assigned to this issue..

I'd also like to understand whether this delay is normal for Powershell support of new Ubuntu LTS releases, so I can plan out migrations better in the future.

Unfortunately, snap is not an option for me anymore, at least not as long as canonical keeps pushing stuff onto my system through snap without my consent. I'm not enough of a Linux expert to go fiddling with broken packages, dependencies and what not.

@theJasonHelmick
Copy link
Collaborator Author

Hi @lutopastialis -- Thank you for the question. We have been targeting the end of August, however may slip to the beginning of September. This is not the normal cadence for any release including Ubuntu. We have been focused on needed improvements to our release pipelines. As we finish that work, new releases will continue on our normal cadence. As the new images are released, I will be notifying in these issues and closing them. Hopefully this will occur in the next few weeks.

@candoumbe
Copy link

Hi there !

Any update on this issue ?
As it's still open, I guess we can't install powershell on Ubuntu 24.04 ?

@mihailim
Copy link
mihailim commented Sep 5, 2024

@candoumbe It's still not supported, not even after 24.04.1 was released and people starting upgrading en masse to noble. It's frankly ridiculous.

BTW, you can check for yourself easily without attempting to install it -- access https://packages.microsoft.com/ubuntu/24.04/prod/pool/main/p/ and check whether there's a powershell subdirectory there. As long as there isn't, it wasn't released yet.

@mihailim
Copy link
mihailim commented Sep 5, 2024

By the way, poor man's workaround:

  1. Download the mantic (!!) build of the icu runtime from https://packages.ubuntu.com/mantic/libicu72 -- in other words, https://packages.ubuntu.com/mantic/amd64/libicu72/download and fetch libicu72_72.1-3ubuntu3_amd64.deb from any of the mirrors.
  2. Download the desired jammy (!!) build of powershell from https://packages.microsoft.com/ubuntu/22.04/prod/pool/main/p/powershell/ -- for example, powershell_7.4.5-1.deb_amd64.deb
  3. Install the packages: sudo apt install /full/path/to/the/downloaded/libicu72_72.1-3ubuntu3_amd64.deb and then sudo apt install /full/path/to/the/downloaded/powershell_7.4.5-1.deb_amd64.deb . Note that you must use the full, absolute path to the downloaded debs, this type of local installation requires that since otherwise apt will try to use a sandboxed user which won't have access to the files. We're using apt instead of dpkg -i to ensure any other dependencies get resolved and fetched.

After this issue is solved and it's properly released for noble, don't forget to later uninstall both powershell and libicu72 and reinstall powershell properly from the noble repository.

@alexeikh
Copy link
alexeikh commented Sep 5, 2024

@mihailim , I think you have the best workaround, but I also have minor suggestions for improvements, especially if we want to automate the installation, for example if we are building a Docker image:

  1. Take libicu70 from jammy instead of libicu72 from mantic, because jammy is LTS and supported, whereas mantic is not supported anymore and may soon disappear from most mirrors.
  2. Use ./ instead of the full path in your apt install command.

Here are the concrete commands:

wget https://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu70_70.1-2_amd64.deb
wget https://packages.microsoft.com/ubuntu/22.04/prod/pool/main/p/powershell/powershell_7.4.5-1.deb_amd64.deb
sudo apt install ./libicu70_70.1-2_amd64.deb ./powershell_7.4.5-1.deb_amd64.deb

@mihailim
Copy link
mihailim commented Sep 5, 2024

@alexeikh Ah, you are right! For some reason I assumed that it would need ICU 72, but it declares a dep on libicu72 | libicu71 | libicu70 | libicu69 | libicu68 | libicu67 | libicu66 | libicu65 | libicu63 | libicu60 | libicu57 | libicu55 | libicu52 so any of those may fulfil it. Thank you!

Not sure about using relative paths for the apt install, though -- it may work, but YMMV depending on your environment. On interactive installs, apt's usage of the _apt sandbox UID can preclude anything but the full absolute path from working. If it works, awesome; otherwise, it'll complain about not finding the .deb file even though it's there, and retrying with the full path will probably succeed.

@theJasonHelmick theJasonHelmick added the KeepOpen The bot will ignore these and not auto-close label Sep 16, 2024
@doherty100
Copy link

@theJasonHelmick any updates?

@RouL
Copy link
RouL commented Sep 18, 2024

My organisation gave up at this moment. We'll continue onwards without PWSH. The release process seems to be not reliable enough when it comes to new Ubuntu LTS Releases. We didn't expect this to happen week 1, but 1 month seems to be a reasonable timeframe. It's now nearly 5 months.

@candoumbe
Copy link

You can install the powershell dotnet tool. I'm a dotnet dev so I already had dotnet on my machine.

@similar-issues-ai similar-issues-ai bot mentioned this issue Sep 23, 2024
14 tasks
@lutopastialis
Copy link

...I can't find any words...

How come we have to "hope" for this apparently trivial task to be completed anytime soon? If this were a one man spare time project I would fully understand. But according to Wikipedia there are 228k people working at Microsoft and there doesn't seem to have been any progress on this since my last inqury a month ago.

So, what's the deal here? Anything??

@rfrerebe-stx
Copy link
rfrerebe-stx commented Sep 24, 2024

Hello,
It's quite an issue. Ubuntu 24.04/Noble is going to be the default container for years to come. Net8.0 / pwsh 7.4 is the LTS also for years to come. Both should be working together as standard pieces of infrastructure.

-- Edited
pwsh 4.5 -> pwsh 7.4 (typo on my side)

@RouL
Copy link
RouL commented Sep 24, 2024

Hello, It's quite an issue. Ubuntu 24.04/Noble is going to be the default container for years to come. Net8.0 / pwsh 4.5 is the LTS also for years to come. Both should be working together as standard pieces of infrastructure.

Don't get me wrong, but I think most people would've been happy if we would've at least got any pwsh 7.x Version at this point. And there is no excuse for this taking 5+ months. I mean wait one more month and a quarter of the time till the next Ubuntu LTS release has already passed.

@rfrerebe-stx
Copy link
rfrerebe-stx commented Sep 24, 2024

Hello, It's quite an issue. Ubuntu 24.04/Noble is going to be the default container for years to come. Net8.0 / pwsh 4.5 is the LTS also for years to come. Both should be working together as standard pieces of infrastructure.

Don't get me wrong, but I think most people would've been happy if we would've at least got any pwsh 7.x Version at this point. And there is no excuse for this taking 5+ months. I mean wait one more month and a quarter of the time till the next Ubuntu LTS release has already passed.

Hello,
I fully agree, but personally I only want 7.4.
7.2 is almost EOL (November 8, 2024 is in less than 2 months) and everything else is past EOL.
7.5 won't be an LTS.
See : Powershell End Of Life
My understanding is that everyone in the industry is making an effort for LTS product to work with other LTS products.

The crazy parts for me is that the dotnet sdk 8.0 on noble has already pwsh

❯ docker run -it mcr.microsoft.com/dotnet/sdk:8.0-noble-amd64 pwsh
PowerShell 7.4.5
PS />

So 99% of the work is done

@Viajaz
Copy link
Viajaz commented Sep 24, 2024

@theJasonHelmick Could we get an update on this? Is there a technical blocker of some sort? I've even heard of a Partner investigating publishing their own Ubuntu PPA feed with this release. I don't think such fragmentation of the ecosystem would be a good thing.

@dixonwille
Copy link
dixonwille commented Oct 4, 2024

Powershell Preview just made it to the repository from what I can tell (7.5.0-preview). So maybe when 7.5 is released? I hope not as it isn't supposed to be GA until January... https://packages.microsoft.com/ubuntu/24.04/prod/pool/main/p/

@theJasonHelmick
Copy link
Collaborator Author

We have updated the build pipeline to include Ubuntu 24.04. The pipeline publishes to packages.microsoft.com when we do a new release. We have released a package for PowerShell 7.5-preview.5 at https://packages.microsoft.com/ubuntu/24.04/prod/pool/main/p/powershell-preview/powershell-preview_7.5.0-preview.5-1.deb_amd64.deb.

The package for the stable version PowerShell will published when we build the next release, PowerShell 7.4.6.

@philhagen
Copy link
philhagen commented Oct 23, 2024

7.4.6 has been built (see https://github.com/PowerShell/PowerShell/releases/tag/v7.4.6). Do you have any insight into when this release will be available for installation with apt via the Microsoft-prod source?

GitHub
7.4.6 - 2024-10-22 Build and Packaging Improvements

Bump .NET SDK to 8.0.403

Copy to static site instead of making blob public (#24269) (#24473)
Add ability to capture MSBuild Binary logs when ...

@philhagen
Copy link

@AndrewSav curious how @theJasonHelmick's comment above is to be interpreted, then.

#21385 (comment)

The package for the stable version PowerShell will published when we build the next release, PowerShell 7.4.6.

@mihailim
Copy link
mihailim commented Oct 24, 2024

It's been finally published, we can all rejoice :) https://packages.microsoft.com/ubuntu/24.04/prod/pool/main/p/powershell/

@mihailim
Copy link

BTW, can explicitly confirm that everything went well transitioning away from the jammy repo to the noble repo for an existing 24.04 system -- simply replace in the corresponding sources.list entry jammy with noble and 22.04 with 24.04, run apt update and then either plain apt upgrade if you were on 7.4.5 or older, or apt install --reinstall powershell if you were already on a jammy build of 7.4.6. You can then purge any older libicuNN package you may have kept around for reasons of satisfying dependencies for the jammy build.

@theJasonHelmick
Copy link
Collaborator Author

This package is now available at PMC. For more information see the PMC Readme:
https://packages.microsoft.com/docs/readme.txt 

We are still working on the docker image pipeline. I will post an update when we have published
images to the MCR.

@lutopastialis
Copy link
lutopastialis commented Nov 12, 2024

I confirm. Installing the latest Powershell stable release on Ubuntu 24.04.1 LTS works using the official instructions for the package repository method works without issues: https://learn.microsoft.com/en-us/powershell/scripting/install/install-ubuntu?view=powershell-7.4#installation-via-package-repository-the-package-repository

Thanks to everyone involved (on both sides :)) 👍

Information about installing PowerShell on Ubuntu

@theJasonHelmick
Copy link
Collaborator Author

The Ubuntu 24.04 distribution is released to PMC.

Copy link
Contributor
microsoft-github-policy-service bot commented Jan 7, 2025

📣 Hey @theJasonHelmick, how did we do? We would love to hear your feedback with the link below! 🗣️

🔗 https://aka.ms/PSRepoFeedback

@microsoft-github-policy-service microsoft-github-policy-service bot removed Needs-Triage The issue is new and needs to be triaged by a work group. KeepOpen The bot will ignore these and not auto-close labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Distribution-Request Request for a new distribution support
Projects
Status: Done
Development

No branches or pull requests

0