Finding packages from debian base on Fedora

I am wondering if there is a way that I can easily find packages from say Debian when looking at source installation requirements so that I can then use DNF to install them.

The reason I ask is that when I look at a lot of Source applications they only provide the requirements in Debian and pasting those requirements into DNF doesn’t work (I assume t because the packages have different names.

Currently I am looking for these packages
bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev libelf-dev liblz4-tool libncurses5 libncurses5-dev libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev

But there are always more.

Any assistance would be helpful.

Thanks in advanced

Use dnf search to look for installable packages. (No need to run an “update” command before. dnf keeps metadata updated for you.)

3 Likes

sudo dnf provides
is also useful

https://dnf.readthedocs.io/en/latest/command_ref.html

1 Like

Sorry, I didn’t really make my question super clear. That is my fault.

The list I have are dependencies for a Source Application. The dependencies are for a Debian based OS and the Developer hasn’t listed the dependencies for RHEL based distros. When I use Search for a package like build-essential I am returned no results. Same result when I use provides.

❯ sudo dnf search build-essential
Last metadata expiration check: 0:42:02 ago on Mon 29 Aug 2022 10:21:05.
No matches found.
  
❯ dnf provides build-essential
Last metadata expiration check: 2 days, 0:11:31 ago on Sat 27 Aug 2022 10:51:46.
Error: No matches found. If searching for a file, try specifying the full path or using a wildcard prefix ("*/") at the beginning.

I am under the impression that all of these packages are available on platforms such as RHEL, Arch, etc. What I need it to be able to work out what the package is on RHEL that is the matching package.

For example I believe that build-essential on Debian is build-tools on Arch Linux, however, I don’t know what the same package is on RHEL

The equivalent of that here is dnf groupinstall "Development Tools"

4 Likes

Thank you for that.

But what about all of the other packages in the list.

bc bison ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev libelf-dev liblz4-tool libncurses5 libncurses5-dev libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev

How can I find out what these packages are called in Fedora?

sudo dnf install bc bison ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev libelf-dev liblz4-tool libncurses5 libncurses5-dev libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev

then you see what fedora recognizes and what not. Packages never are all the same named in different Distributions. But at least this way you not have to find the whole list.

But anyway if the developer not gives the specs for fedora it is not meant to run it on fedora.

Probably you just should link the page you saw the app from. Might be we can find a alternative or someone knows a manual you not found yet.

1 Like

In this instance I am looking to build an AOSP variant called lineage OS

https://wiki.lineageos.org/devices/starlte/build#install-the-build-packages

build-essential is a metapackage, so you need to find out what packages it contains and install them. In Fedora, there is C Development Tools and Libraries group which contains most of those packages. Packages ending with -dev are header files for related libraries and their names end with -devel on Fedora, they may or may not start with lib, e.g. it is ncurses-devel in Fedora.

Thanks for that, I am looking up each of the packages now one-by-one for each of the following

g++-multilib gcc-multilib imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev libelf-dev liblz4-tool libncurses5 libncurses5-dev libsdl1.2-dev libssl-dev libxml2-utils zlib1g-dev

I have found some of them :slight_smile:
Hopefully I find more soon

2 Likes

Basically try to list files owned by the package in Debian and try to find an equivalent package which provides that file on Fedora. Bear in mind that sometimes you couldn’t use the full absolute file path, so try to use */file-name.

On Debian (preferrably use podman or VM) install apt-file and run: apt-file show <package-name>

$ sudo apt-file show zlib1g-dev
zlib1g-dev: /usr/include/zconf.h          
zlib1g-dev: /usr/include/zlib.h
zlib1g-dev: /usr/lib/x86_64-linux-gnu/libz.a
zlib1g-dev: /usr/lib/x86_64-linux-gnu/libz.so
zlib1g-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/zlib.pc
zlib1g-dev: /usr/share/doc/zlib1g-dev/FAQ.gz
zlib1g-dev: /usr/share/doc/zlib1g-dev/README.gz
zlib1g-dev: /usr/share/doc/zlib1g-dev/algorithm.txt.gz
zlib1g-dev: /usr/share/doc/zlib1g-dev/changelog.Debian.gz
zlib1g-dev: /usr/share/doc/zlib1g-dev/changelog.gz
zlib1g-dev: /usr/share/doc/zlib1g-dev/copyright
zlib1g-dev: /usr/share/doc/zlib1g-dev/examples/README.examples
zlib1g-dev: /usr/share/doc/zlib1g-dev/examples/enough.c.gz
zlib1g-dev: /usr/share/doc/zlib1g-dev/examples/example.c.gz
zlib1g-dev: /usr/share/doc/zlib1g-dev/examples/fitblk.c.gz
zlib1g-dev: /usr/share/doc/zlib1g-dev/examples/gun.c.gz
zlib1g-dev: /usr/share/doc/zlib1g-dev/examples/gzappend.c.gz
zlib1g-dev: /usr/share/doc/zlib1g-dev/examples/gzjoin.c.gz
zlib1g-dev: /usr/share/doc/zlib1g-dev/examples/gzlog.c.gz
zlib1g-dev: /usr/share/doc/zlib1g-dev/examples/gzlog.h.gz
zlib1g-dev: /usr/share/doc/zlib1g-dev/examples/infcover.c.gz
zlib1g-dev: /usr/share/doc/zlib1g-dev/examples/minigzip.c.gz
zlib1g-dev: /usr/share/doc/zlib1g-dev/examples/zlib_how.html
zlib1g-dev: /usr/share/doc/zlib1g-dev/examples/zpipe.c.gz
zlib1g-dev: /usr/share/doc/zlib1g-dev/examples/zran.c.gz
zlib1g-dev: /usr/share/doc/zlib1g-dev/txtvsbin.txt.gz
zlib1g-dev: /usr/share/man/man3/zlib.3.gz

Then on Fedora use dnf to get the package name:

$ sudo dnf provides /usr/include/zconf.h
Last metadata expiration check: 3:04:50 ago on Mon 29 Aug 2022 09:44:09 AM CEST.
zlib-devel-1.2.11-31.fc36.i686 : Header files and libraries for Zlib development
Repo        : fedora
Matched from:
Filename    : /usr/include/zconf.h

zlib-devel-1.2.11-31.fc36.x86_64 : Header files and libraries for Zlib development
Repo        : fedora
Matched from:
Filename    : /usr/include/zconf.h

zlib-devel-1.2.11-32.fc36.i686 : Header files and libraries for Zlib development
Repo        : updates
Matched from:
Filename    : /usr/include/zconf.h

zlib-devel-1.2.11-32.fc36.x86_64 : Header files and libraries for Zlib development
Repo        : @System
Matched from:
Filename    : /usr/include/zconf.h

zlib-devel-1.2.11-32.fc36.x86_64 : Header files and libraries for Zlib development
Repo        : updates
Matched from:
Filename    : /usr/include/zconf.h

Note: Skip -multilib suffix from package name and 32 for which install :i686 equivalent and version, if needed.

Example for lib32ncurses5-dev. Skip 32 and 5 and use:

$ sudo apt-file show libncurses-dev | grep include | head -n1
libncurses-dev: /usr/include/curses.h
$ sudo dnf provides /usr/include/curses.h
Last metadata expiration check: 3:19:58 ago on Mon 29 Aug 2022 09:44:09 AM CEST.
ncurses-devel-6.2-9.20210508.fc36.i686 : Development files for the ncurses library
Repo        : fedora
Matched from:
Filename    : /usr/include/curses.h

ncurses-devel-6.2-9.20210508.fc36.x86_64 : Development files for the ncurses library
Repo        : @System
Matched from:
Filename    : /usr/include/curses.h

ncurses-devel-6.2-9.20210508.fc36.x86_64 : Development files for the ncurses library
Repo        : fedora
Matched from:
Filename    : /usr/include/curses.h

For -multilib on x86_64 install both x86_64 and ':i686` counterpart:

$ sudo apt-file show g++ | head -n1
g++: /usr/bin/g++
$ sudo dnf provides /usr/bin/g++
gcc-c++-12.0.1-0.16.fc36.i686 : C++ support for GCC
Repo        : fedora
Matched from:
Filename    : /usr/bin/g++

gcc-c++-12.0.1-0.16.fc36.x86_64 : C++ support for GCC
Repo        : fedora
Matched from:
Filename    : /usr/bin/g++

gcc-c++-12.1.1-1.fc36.x86_64 : C++ support for GCC
Repo        : @System
Matched from:
Filename    : /usr/bin/g++

gcc-c++-12.2.1-1.fc36.x86_64 : C++ support for GCC
Repo        : updates
Matched from:
Filename    : /usr/bin/g++

Finally you would need to install on Fedora:

$ sudo dnf install gcc-c++.i686 gcc-c++

Repeat, or better automate that process, for other packages.

2 Likes