今日已更新 199 条资讯 | 累计 34483 条内容
关于我们

Fixing a Snapcraft Build that had been Broken for Two Years

Tomas Gallucci 2026年08月22日 05:53 0 次阅读 来源:Dev.to

As I stated in my introduction , the first piece of work I did on Packet Sender was fix the Snapcraft build. What is Snapcraft? It has been a while since I've worked with Ubuntu, so I wasn't up to speed with how Ubuntu was now doing things like package management. As I understand it, apt and/or apt-get is still a thing, but Snapcraft is the new shiny. Snapcraft is more than just an app repository, though. It's a build system, dependency manager and a packager. Ergo, the vertical integration means you don’t have to keep multiple tools in sync. The Problem When building Packet Sender with Snapcraft, the product would build, link and run. But as soon as you ran it, it would crash with the following error message: /snap/packetsender/49/usr/local/bin/packetsender: error while loading shared libraries: libpxbackend-1.0.so: cannot open shared object file: No such file or directory .dll(s) and .so(s) I grew up in the '90s. This meant that, unfortunately, I grew up in the age of Microsoft, meaning I started on PCs. While I remember Windows 3.1's UI, I didn't really start using computers until Windows 95. My first machine was a Windows 98 box. I tell you this so you know that I grew up knowing what a .dll is because I grew up using Windows. Simply put, a .dll is a shared library . The idea was that instead of having to compile common libraries into executables and thus bloat the size of executables and the amount of memory they needed, vendors could deliver a shared library that would be loaded into memory once and could be called at run time by any running process that needed them. Of course, Microsoft being Microsoft, this was poorly engineered . .so s 1 are the same idea but on *nix. Thankfully, they had time to learn from Microsoft's mistakes. What does the error message mean? Simply put, what the error message was trying to tell us was that when the code was compiled, we assumed the .so files would be in a given place, but they weren't. One common way to fix this is with

本文内容来源于互联网,版权归原作者所有
查看原文