# Building a deb package out of PackageCompiler generated binary

**URL:** <https://discourse.julialang.org/t/building-a-deb-package-out-of-packagecompiler-generated-binary/124187>\
**Category:** General Usage\
**Created:** [December 26, 2024, 4:05pm UTC](https://discourse.julialang.org/t/building-a-deb-package-out-of-packagecompiler-generated-binary/124187 "2024-12-26T16:05:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lior\_Assouline](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lior_assouline/32/35564_2.png) [@Lior\_Assouline](https://discourse.julialang.org/u/Lior_Assouline)\
**Post date:** [December 26, 2024, 4:05pm UTC](https://discourse.julialang.org/t/building-a-deb-package-out-of-packagecompiler-generated-binary/124187/1 "2024-12-26T16:05:54Z")

</div>

Hi All,  
I’m looking for the old and and wise in this forum for a specific issue I’m running when trying to package a binary generated with PackageCompiler into a regular deb pkg.  
In shlibdeps stage the deb packger tries to find the location of every dependency and fails with

`dpkg-shlibdeps: error: cannot find library libgfortran.so.5 needed by debian/algorithms/usr/share/julia/artifacts/e85c0a68e07fee0ee7b19c2abc210b1af2f4771a/lib/libmpifort.so.12.4.3 (ELF format: 'elf64-x86-64' abi: '0201003e00000000'; RPATH: '/usr/share/julia/artifacts/e85c0a68e07fee0ee7b19c2abc210b1af2f4771a/lib')`

This forces me to do some bash wizerdry to try to locate every dependency so file and copy it to where the executable is looking for (RPATH).  
It seems like RPATH along with deb packaging is complex… Did anyone run into those issues and found a simple way to overcome this complexity ?

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [December 26, 2024, 6:22pm UTC](https://discourse.julialang.org/t/building-a-deb-package-out-of-packagecompiler-generated-binary/124187/2 "2024-12-26T18:22:29Z")

</div>

This is not a supported scenario, so you are pretty much on your own. Building snap packages is a supported scenario: [GitHub - PeaceFounder/AppBundler.jl: Bundle your Julia application](https://github.com/PeaceFounder/AppBundler.jl)

---

<div class="post-metadata">

**Author:** ![benc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/benc/32/46974_2.png) [@benc](https://discourse.julialang.org/u/benc)\
**Post date:** [January 5, 2025, 2:09pm UTC](https://discourse.julialang.org/t/building-a-deb-package-out-of-packagecompiler-generated-binary/124187/3 "2025-01-05T14:09:09Z")

</div>

Perhaps this can work (have not tried myself) [https://binarybuilder.org/](https://binarybuilder.org/)  
With PackageCompiler on Linux, be careful with the CPU\_ARCH versions, sometimes that does not port well, I’ve had to specify generic versions to avoid errors between desktop/clusters.

---

<div class="post-metadata">

**Author:** ![Lior\_Assouline](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lior_assouline/32/35564_2.png) [@Lior\_Assouline](https://discourse.julialang.org/u/Lior_Assouline)\
**Post date:** [January 5, 2025, 4:17pm UTC](https://discourse.julialang.org/t/building-a-deb-package-out-of-packagecompiler-generated-binary/124187/4 "2025-01-05T16:17:53Z")

</div>

PackageCompiler does build an executable but a deb installer is something on top of that… deb installer takes care of locating all the .so files and putting them in the right place. It’s kind of contradictory to the julia principles of binaries that are readyto be run everywhere with no install…
