Powershell: Wrong depedencies of powershell-preview (7.0.0) package for Debian 10

Created on 25 Nov 2019  路  6Comments  路  Source: PowerShell/PowerShell

Steps to reproduce

sudo apt install ./powershell-preview_7.0.0-preview.6-1.debian.10_amd64.deb
# or install powershell-preview from 
# deb [arch=amd64] https://packages.microsoft.com/debian/10/prod buster main

Expected behavior

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'powershell-preview' instead of './powershell-preview_7.0.0-preview.6-1.1.debian.10_amd64.deb'
The following NEW packages will be installed:
  powershell-preview
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
After this operation, 158 MB of additional disk space will be used.
Get:1 /home/user/tests/powershell-preview_7.0.0-preview.6-1.1.debian.10_amd64.deb powershell-preview amd64 7.0.0-preview.6-1.debian.10 [99.0 MB]
Selecting previously unselected package powershell-preview.
(Reading database ... 545800 files and directories currently installed.)
Preparing to unpack .../powershell-preview_7.0.0-preview.6-1.1.debian.10_amd64.deb ...
Unpacking powershell-preview (7.0.0-preview.6-1.debian.10) ...
Setting up powershell-preview (7.0.0-preview.6-1.debian.10) ...
Processing triggers for man-db (2.8.5-2) ...

Actual behavior

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'powershell-preview' instead of './powershell-preview_7.0.0-preview.6-1.debian.10_amd64.deb'
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-preview : Depends: libssl1.0.2 but it is not installable
                      Depends: libicu57 but it is not installable
E: Unable to correct problems, you have held broken packages.

Environment data

Name                           Value
----                           -----
PSVersion                      7.0.0-preview.6
PSEdition                      Core
GitCommitId                    7.0.0-preview.6
OS                             Linux 5.2.0-0.bpo.3-amd64 #1 SMP Debian 5.2.17-1~bpo10+1 (2019-09-30)
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Package: powershell-preview
Version: 7.0.0-preview.6-1.debian.10
Priority: extra
Section: shells
Maintainer: PowerShell Team <[email protected]>
Installed-Size: 158 MB
Depends: libc6, libgcc1, libgssapi-krb5-2, liblttng-ust0, libstdc++6, zlib1g, libssl1.0.2, libicu57
Homepage: https://microsoft.com/powershell
License: MIT License
Vendor: Microsoft Corporation
Download-Size: 58.1 MB
APT-Sources: https://packages.microsoft.com/debian/10/prod buster/main amd64 Packages
Description: PowerShell is an automation and configuration management platform.
 It consists of a cross-platform command-line shell and associated scripting language.

Suggestions

  • Directly change dependencies to libssl1.1, libicu63, for e.g.:
Package: powershell-preview
Version: 7.0.0-preview.6-1.debian.10
Status: install ok installed
Priority: extra
Section: shells
Maintainer: PowerShell Team <[email protected]>
Installed-Size: 158 MB
Depends: libc6, libgcc1, libgssapi-krb5-2, liblttng-ust0, libstdc++6, zlib1g, libssl1.1, libicu63
Homepage: https://microsoft.com/powershell
License: MIT License
Vendor: Microsoft Corporation
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /var/lib/dpkg/status
Description: PowerShell is an automation and configuration management platform.
 It consists of a cross-platform command-line shell and associated scripting language.

Work around method for current Debian Buster users:

Note: this method is dirty, and use this on your own risk

extract

mkdir powershell-preview_7.0.0-preview.6-1-1.debian.10_amd64
bsdtar xvf powershell-preview_7.0.0-preview.6-1.debian.10_amd64.deb -C powershell-preview_7.0.0-preview.6-1-1.debian.10_amd64
cd powershell-preview_7.0.0-preview.6-1-1.debian.10_amd64
mkdir DEBIAN
tar xvf control.tar.gz -C DEBIAN ## non gzip archive actually
tar zxvf data.tar.gz
rm control.tar.gz data.tar.gz
ls
## It should be:
# DEBIAN  opt  usr

fix info

--- DEBIAN/control       2019-11-19 06:02:18.000000000 +0800
+++ DEBIAN/control       2019-11-25 19:11:41.986636209 +0800
@@ -1,11 +1,11 @@
 Package: powershell-preview
-Version: 7.0.0-preview.6-1.debian.10
+Version: 7.0.0-preview.6-1-1.debian.10
 License: MIT License
 Vendor: Microsoft Corporation
 Architecture: amd64
 Maintainer: PowerShell Team <[email protected]>
 Installed-Size: 154170
-Depends: libc6, libgcc1, libgssapi-krb5-2, liblttng-ust0, libstdc++6, zlib1g, libssl1.0.2, libicu57
+Depends: libc6, libgcc1, libgssapi-krb5-2, liblttng-ust0, libstdc++6, zlib1g, libssl1.1, libicu63
 Section: shells
 Priority: extra
 Homepage: https://microsoft.com/powershell

Package it again

cd .. ## $OLDPWD is under powershell-preview_7.0.0-preview.6-1-1.debian.10_amd64
dpkg-deb -b powershell-preview_7.0.0-preview.6-1-1.debian.10_amd64
bsdtar tf powershell-preview_7.0.0-preview.6-1-1.debian.10_amd64.deb ## check
sudo apt install ./powershell-preview_7.0.0-preview.6-1-1.debian.10_amd64.deb

Done!

Area-Maintainers-Build Issue-Bug MustHave Resolution-Fixed

All 6 comments

It is documented https://github.com/MicrosoftDocs/PowerShell-Docs/blob/staging/reference/docs-conceptual/install/Installing-PowerShell-Core-on-Linux.md#debian-10

GitHub
The official PowerShell documentation sources. Contribute to MicrosoftDocs/PowerShell-Docs development by creating an account on GitHub.

But this official 7-preview package for Debian 10, still set libssl1.0.2, libicu57 (which only appear in Debian 9) as dependencies, it should be corrected.

Documents only told you how to build and manually install, but installed contents by that method cannot be managed by apt, and apply security or feature update in the future.

@holishing we are getting another report that the same libraries should be used on debian10... any feedback?

Well, I think we cannot find out the same libraries (libssl1.0.2, libicu57) in official repo(main, sec urity-update ) in Debian Buster, if old-stable version of those package is needed, maybe we should consider add them into custom repo (i.e. packages.microsoft.com) or figure out more clean way to solve dependencies problem? :

$ docker run -it debian:buster bash
root@3729f145bf6f:/# apt update
Get:1 http://security-cdn.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://cdn-fastly.deb.debian.org/debian buster InRelease [122 kB]                                               
Get:4 http://security-cdn.debian.org/debian-security buster/updates/main amd64 Packages [159 kB]
Get:3 http://cdn-fastly.deb.debian.org/debian buster-updates InRelease [49.3 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian buster/main amd64 Packages [7908 kB]
Get:6 http://cdn-fastly.deb.debian.org/debian buster-updates/main amd64 Packages [5792 B]                                                                                                   
Fetched 8309 kB in 8s (1105 kB/s)                                                                                                                                                           
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
root@3729f145bf6f:/# apt search libssl
Sorting... Done
Full Text Search... Done
libssl-dev/stable,stable 1.1.1d-0+deb10u2 amd64
  Secure Sockets Layer toolkit - development files

libssl-doc/stable,stable 1.1.1d-0+deb10u2 all
  Secure Sockets Layer toolkit - development documentation

libssl-ocaml/stable 0.5.5-1 amd64
  OCaml bindings for OpenSSL (runtime)

libssl-ocaml-dev/stable 0.5.5-1 amd64
  OCaml bindings for OpenSSL

libssl-utils-clojure/stable 0.8.3-2 all
  library for SSL certificate management on the JVM

libssl1.1/stable,stable 1.1.1d-0+deb10u2 amd64
  Secure Sockets Layer toolkit - shared libraries

root@3729f145bf6f:/# apt search libicu
Sorting... Done
Full Text Search... Done
libicu-dev/stable 63.1-6 amd64
  Development files for International Components for Unicode

libicu-le-hb-dev/stable 1.0.3+git180724-3 amd64
  ICU Layout Engine API on top of HarfBuzz shaping library (development)

libicu-le-hb0/stable 1.0.3+git180724-3 amd64
  ICU Layout Engine API on top of HarfBuzz shaping library

libicu4j-4.4-java/stable 4.4.2.2-3 all
  Library for Unicode support and internationalization

libicu4j-java/stable 62.1-2 all
  Library for Unicode support and internationalization

libicu4j-java-doc/stable 62.1-2 all
  Library for Unicode support and internationalization - Docs

libicu63/stable 63.1-6 amd64
  International Components for Unicode

root@3729f145bf6f:/#

:tada:This issue was addressed in #11236, which has now been successfully released as v7.0.0-rc.1.:tada:

Handy links:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ephos picture ephos  路  65Comments

NJ-Dude picture NJ-Dude  路  64Comments

msftrncs picture msftrncs  路  62Comments

andschwa picture andschwa  路  64Comments

SteveL-MSFT picture SteveL-MSFT  路  66Comments