Unable to Install the Deb Package #119

Open
opened 2026-01-29 16:30:01 +00:00 by claunia · 5 comments
Owner

Originally created by @jamsoft on GitHub (Jul 29, 2022).

I have my build system producing .deb and .rpm packages. This is all working within my build process to produce the two packages.

From my gitlab build ...

dotnet-deb MyApp.csproj -r:linux-x64 -f:net6.0 -c:Release

This is being built on PopOS 22.04.

I've set up a VM for testing this package also running PopOS 20.04.

I copied this deb package to the VM and double-clicked it to start the install. It immediately bombed with:

com.github.donadigo.eddy
Installation Failed
child process exited with code 100

Looking around, code 100 is a generic error so not much use on it's own. So I decided to try sudo apt-get.

cd to the location on disk
sudo apt-get install MyApp.1.0.0.linux-x64.deb

This errors with:

Reading package lists ... Done
Building dependency tree... done
Reading state information... done
E: unable to locate package MyApp.deb
E: Couldn't find any package by glob 'MyApp.deb'
E: Couldn't find any package by regex 'MyApp.deb'

I have created a few icon files and a .desktop file that are packaged within my *.deb package and a PostInstallScript element like this:

<PropertyGroup>
        <PostInstallScript>
            <![CDATA[
cp -p myapp.xpm /usr/share/pixmaps/
cp -p myapp.png /usr/share/icons/hicolor/48x48/apps/
cp -p myapp.svg /usr/share/icons/hicolor/scalable/apps/
cp -p myapp.desktop /usr/share/applications/
            ]]>
        </PostInstallScript>
    ...

Does anyone have any clues as to what's going on here? At this stage I'm not even sure what to google for potential solutions.

The first E: error line is just monumentally confusing as it appears to not even find the package at all.

Any pointers would be really appreciated.

Originally created by @jamsoft on GitHub (Jul 29, 2022). I have my build system producing `.deb` and `.rpm` packages. This is all working within my build process to produce the two packages. From my gitlab build ... ```yml dotnet-deb MyApp.csproj -r:linux-x64 -f:net6.0 -c:Release ``` This is being built on PopOS 22.04. I've set up a VM for testing this package also running PopOS 20.04. I copied this `deb` package to the VM and double-clicked it to start the install. It immediately bombed with: ``` com.github.donadigo.eddy Installation Failed child process exited with code 100 ``` Looking around, code 100 is a generic error so not much use on it's own. So I decided to try sudo apt-get. ``` cd to the location on disk sudo apt-get install MyApp.1.0.0.linux-x64.deb ``` This errors with: ``` Reading package lists ... Done Building dependency tree... done Reading state information... done E: unable to locate package MyApp.deb E: Couldn't find any package by glob 'MyApp.deb' E: Couldn't find any package by regex 'MyApp.deb' ``` I have created a few icon files and a .desktop file that are packaged within my `*.deb` package and a `PostInstallScript` element like this: ``` <PropertyGroup> <PostInstallScript> <![CDATA[ cp -p myapp.xpm /usr/share/pixmaps/ cp -p myapp.png /usr/share/icons/hicolor/48x48/apps/ cp -p myapp.svg /usr/share/icons/hicolor/scalable/apps/ cp -p myapp.desktop /usr/share/applications/ ]]> </PostInstallScript> ... ``` Does anyone have any clues as to what's going on here? At this stage I'm not even sure what to google for potential solutions. The first `E:` error line is just monumentally confusing as it appears to not even find the package at all. Any pointers would be really appreciated.
Author
Owner

@atauenis commented on GitHub (Jul 29, 2022):

Instead of sudo apt-get install MyApp.1.0.0.linux-x64.deb, try to use sudo apt install ./MyApp.1.0.0.linux-x64.deb or sudo dpkg -i MyApp.1.0.0.linux-x64.deb (more correct way, but doesn't installs dependencies automatically).


Also it is better to use <LinuxPath> instead of postinst script:

    <Content Include="myapp.xpm" CopyToPublishDirectory="Always">
	   <LinuxPath>/usr/share/pixmaps/myapp.xpm</LinuxPath>
    </Content>
    <Content Include="myapp.png" CopyToPublishDirectory="Always">
	   <LinuxPath>/usr/share/icons/hicolor/48x48/apps/myapp.png</LinuxPath>
    </Content>
    <!-- and so on -->
@atauenis commented on GitHub (Jul 29, 2022): Instead of `sudo apt-get install MyApp.1.0.0.linux-x64.deb`, try to use `sudo apt install ./MyApp.1.0.0.linux-x64.deb` or `sudo dpkg -i MyApp.1.0.0.linux-x64.deb` (more correct way, but doesn't installs dependencies automatically). --- Also it is better to use `<LinuxPath>` instead of postinst script: ```XML <Content Include="myapp.xpm" CopyToPublishDirectory="Always"> <LinuxPath>/usr/share/pixmaps/myapp.xpm</LinuxPath> </Content> <Content Include="myapp.png" CopyToPublishDirectory="Always"> <LinuxPath>/usr/share/icons/hicolor/48x48/apps/myapp.png</LinuxPath> </Content> <!-- and so on --> ```
Author
Owner

@jamsoft commented on GitHub (Jul 29, 2022):

Ahhhhhhh, thank you. Will go investigate. Strinctly speaking there shouldn't be any dependencies. I'm AOT compiling my .NET 6 application so at least that element is simpler. Thanks for the response.

@jamsoft commented on GitHub (Jul 29, 2022): Ahhhhhhh, thank you. Will go investigate. Strinctly speaking there shouldn't be any dependencies. I'm AOT compiling my .NET 6 application so at least that element is simpler. Thanks for the response.
Author
Owner

@jamsoft commented on GitHub (Jul 30, 2022):

I've made a bit of a discovery. Using apt install revealed an issue:

Package dependency problems
Package depends on libssl1.1

So I started looking for a solution to that, which I think is a relevant <RpmDotNetDependency Include="libunwind" Version="" /> (I couldn't see any examples of a <DebDotNetDependency... here. So would an <RpmDotNetDependency work?

Whilst I was investigating this, I came across this post. Where it seems to suggest 1.1 is now deprecated.

Ubuntu 22.04 uses libssl3, and thus libssl1.1 is deprecated at this point.

Creating a new package for Ubuntu 22.04 that uses an obsolete libssl version seems like a very bad idea. Also, messing with versions for systemwide libraries like libssl is a similarly a very bad idea, which may have unpredictable consequences in the future.

So one option is that if you will continue to use Ubuntu 22.04, you should convert into using libssl3 for your apps.

Another option is to run legacy apps inside a VM or container, where you could install an older version of Ubuntu (e.g. 20.04) that has libssl1.1 installed.

These two options seem to be the most viable paths to take in your situation.

So I'm unsure what to do at this point. I'm installing onto an instance of PopOS based on Ubunto 22.04.

Another comment on that SO thread reads:

You need to understand that libssl1.1 is no longer used in Ubuntu 22.04. So you have some options: 1) Either understand what you're doing, and make things work with libssl3 or 2) Run your legacy app in a container or VM using on older version of Ubuntu (e.g. 20.04) that has libssl1.1. Mixing libssl1.1 into Ubuntu 22.04 is a very bad idea.

Any pointers on how to navigate this would be appreciated. I'm honestly not sure what would be introducing this dependency within my application so I'm assuming it's something to do with the packaging process itself.

@jamsoft commented on GitHub (Jul 30, 2022): I've made a bit of a discovery. Using apt install revealed an issue: ``` Package dependency problems Package depends on libssl1.1 ``` So I started looking for a solution to that, which I think is a relevant `<RpmDotNetDependency Include="libunwind" Version="" />` (I couldn't see any examples of a `<DebDotNetDependency...` [here](https://github.com/quamotion/dotnet-packaging/blob/master/demo/cliscd/cliscd.csproj). So would an `<RpmDotNetDependency` work? Whilst I was investigating this, I came across this [post](https://askubuntu.com/a/1412746). Where it seems to suggest 1.1 is now deprecated. > Ubuntu 22.04 uses libssl3, and thus libssl1.1 is deprecated at this point. > > Creating a new package for Ubuntu 22.04 that uses an obsolete libssl version seems like a very bad idea. Also, messing with versions for systemwide libraries like libssl is a similarly a very bad idea, which may have unpredictable consequences in the future. > > So one option is that if you will continue to use Ubuntu 22.04, you should convert into using libssl3 for your apps. > > Another option is to run legacy apps inside a VM or container, where you could install an older version of Ubuntu (e.g. 20.04) that has libssl1.1 installed. > > These two options seem to be the most viable paths to take in your situation. So I'm unsure what to do at this point. I'm installing onto an instance of PopOS based on Ubunto 22.04. Another comment on that SO thread reads: > You need to understand that libssl1.1 is no longer used in Ubuntu 22.04. So you have some options: 1) Either understand what you're doing, and make things work with libssl3 or 2) Run your legacy app in a container or VM using on older version of Ubuntu (e.g. 20.04) that has libssl1.1. Mixing libssl1.1 into Ubuntu 22.04 is a very bad idea. Any pointers on how to navigate this would be appreciated. I'm honestly not sure what would be introducing this dependency within my application so I'm assuming it's something to do with the packaging process itself.
Author
Owner

@atauenis commented on GitHub (Jul 30, 2022):

Add <SelfContained>False</SelfContained> to csproj file, this should remove libssl requirement. Exactly, the app will require only dotnet-runtime-6.0 package and nothing more.

I couldn't see any examples of a <DebDotNetDependency

They're almost identical with RpmDotNetDependency.

<!-- An working example of using Deb/Rpm dependencies and recommended package list from my project (https://github.com/atauenis/webone) -->
  <ItemGroup Condition="$(SelfContained)==false">
    <DebDotNetDependencies Include="dotnet-runtime-6.0" />
    <RpmDotNetDependencies Include="dotnet-runtime-6.0" />
  </ItemGroup>

  <ItemGroup>
    <DebDependency Include="imagemagick-6.q16" />
    <DebRecommends Include="ffmpeg" />
    <DebRecommends Include="youtube-dl" />
  </ItemGroup>

  <ItemGroup>
    <RpmDependency Include="ImageMagick" />
  </ItemGroup>

There also a some syntax for setting package versions, it is diffrent for Deb and Rpm. I have almost no experience with it, but probably it may be found in deb/rpm manuals (e.g. man deb-control in Debian and something similar in RedHat-like about RPM). At least for debs, the syntax from Debian manpage is working.

@atauenis commented on GitHub (Jul 30, 2022): Add `<SelfContained>False</SelfContained>` to csproj file, this should remove `libssl` requirement. Exactly, the app will require only `dotnet-runtime-6.0` package and nothing more. > I couldn't see any examples of a <DebDotNetDependency They're almost identical with RpmDotNetDependency. ```XML <!-- An working example of using Deb/Rpm dependencies and recommended package list from my project (https://github.com/atauenis/webone) --> <ItemGroup Condition="$(SelfContained)==false"> <DebDotNetDependencies Include="dotnet-runtime-6.0" /> <RpmDotNetDependencies Include="dotnet-runtime-6.0" /> </ItemGroup> <ItemGroup> <DebDependency Include="imagemagick-6.q16" /> <DebRecommends Include="ffmpeg" /> <DebRecommends Include="youtube-dl" /> </ItemGroup> <ItemGroup> <RpmDependency Include="ImageMagick" /> </ItemGroup> ``` There also a some syntax for setting package versions, it is diffrent for Deb and Rpm. I have almost no experience with it, but probably it may be found in deb/rpm manuals (e.g. `man deb-control` in Debian and something similar in RedHat-like about RPM). At least for debs, the syntax from Debian manpage is working.
Author
Owner

@jamsoft commented on GitHub (Jul 30, 2022):

Thanks for this, will investigate.

One issue here is I cannot remove self-contained=true as it's a requirement for the AOT compilation.

@jamsoft commented on GitHub (Jul 30, 2022): Thanks for this, will investigate. One issue here is I cannot remove self-contained=true as it's a requirement for the AOT compilation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dotnet-packaging#119