---
title: Snapcraft now auto-detects missing dependencies
description: 'When you build snaps, the process of composing a complete snapcraft.yaml
  file will usually revolve around three main activities: parts, build requirements
  and runtime components. Sometimes, you may discover that you’re missing certain
  libraries in the compilation stage, or that they are required for your application
  to run. In most cases, […]'
url: https://canonical.com/blog/snapcraft-now-auto-detects-missing-dependencies?format=md
---

1. [Blog](https://canonical.com/blog)
2. Article

---

[Igor Ljubuncic](https://canonical.com/blog/author/igorljubuncic "More about Igor Ljubuncic")

5 December 2019

# Snapcraft now auto-detects missing dependencies

[snapcraft](https://canonical.com/blog/tag/snapcraft)
[snapcraft.io](https://canonical.com/blog/tag/snapcraft-io)

---

Share the article

When you build snaps, the process of composing a complete snapcraft.yaml file will usually revolve around three main activities: parts, build requirements and runtime components. Sometimes, you may discover that you’re missing certain libraries in the compilation stage, or that they are required for your application to run. In most cases, you will iterate on your build a few times, and perhaps use our [faster development guide](https://snapcraft.io/blog/make-your-snap-development-faster) to quickly nail down the missing elements.

From snapcraft release 3.7 onward, things have become ever so easier. Now, it is possible to have snapcraft automatically detect and list missing runtime libraries, and allow you to complete your build with fewer errors and in less time.

# Missing files detection

The core principle behind the change is that snapcraft will now generate a list of entries you need to include as your stage packages in snapcraft.yaml. This means you will not have to manually run your application, or use *ldd* to trace the dynamic dependencies, to figure out if any library is missing. This streamlines the user experience, and makes builds more elegant and faster.

For instance, on the command line, you will see something like the output below:

```
Staging dosbox-x
Priming desktop-glib-only
Priming fdk-aac
Priming nv-codec-headers
Priming ffmpeg
Priming dosbox-x
The 'dosbox-x' part is missing libraries that are not included in the snap or base. They can be satisfied by adding the following entries to the existing stage-packages for this part:

- libxkbfile1

Snapping 'dosbox-x'
Snapped dosbox-x_0.82.23_amd64.snap
```

Once the prime step of the build process runs, snapcraft checks for missing entries. The printed message is meaningful, and will be particularly useful to new snapcraft users.

Now, it is possible there might be assets that are not available in the standard repository archives, and you will have to manually download and satisfy the runtime requirements. You can achieve this by using the [dump plugin](https://snapcraft.io/blog/the-smart-dump-plugin), for instance.

Upcoming versions of snapcraft will have extended missing file detection functionality. Snapcraft will be able to take into account plugs using the [content interface](https://snapcraft.io/docs/content-interface), allowing for an ever more streamlined experience.

# Summary

Snapcraft has many useful features and options. Sometimes, it can take a little time and practice to discover them, and put them to good use into your snap development. Missing library detection is an essentially simple yet powerful functionality that should make the overall development experience fresher and more efficient.

We hope you appreciate the occasional tip and trick we share here, like the introduction of the [KDE neon extension](https://snapcraft.io/blog/snapcraft-secret-sauce-kde-neon-extension) (and GNOME extension), or this guide. If you have any specific asks, or comments, please join our [forum](https://forum.snapcraft.io/) and let us know what you think.

Photo by [William Bout](https://unsplash.com/@williambout?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText).

[Get in touch

Interested in running Ubuntu in your organization?](https://ubuntu.com/about/contact-us/form)

## Sign up for our newsletter

Get the latest Canonical news and updates in your inbox.

Work email:

\*I agree to receive information about Canonical's
products and services.

By submitting this form, I confirm that I have read and agree to [Canonical's Privacy Policy](https://canonical.com/legal/dataprivacy).

Sign up

## Share on

---

## Related posts

[### Snapcraft 8.0 and the respectable end of core18](https://canonical.com/blog/snapcraft-8-0-and-the-respectable-end-of-core18)

‘E’s not pinin’! ‘E’s passed on! This base is no more! He has ceased to be! ‘E’s expired and gone to meet ‘is maker! ‘E’s a stiff! Bereft of life, ‘e rests in peace! If you...

[Igor Ljubuncic](https://canonical.com/blog/author/igorljubuncic)

16 June 2023

[### TurtleBot3 OpenCR firmware update from a snap](https://canonical.com/blog/turtlebot3-opencr-firmware-update-from-a-snap)

The TurtleBot3 robot is a standard platform robot in the ROS community, and it’s a reference that Canonical knows well, since we’ve used it in our tutorials. As a matter of...

[gbeuzeboc](https://canonical.com/blog/author/gbeuzeboc)

25 September 2024

[### Creating Snaps on Ubuntu Touch](https://canonical.com/blog/creating-snaps-on-ubuntu-touch)

This article was written in collaboration with Alfred E. Neumayer of the UBports Project. Tablets, phones and current technology’s capabilities are phenomenal. Who would have...

[Aaron Prisk](https://canonical.com/blog/author/aaronprisk)

3 April 2024

[### Managing software in complex network environments: the Snap Store Proxy](https://canonical.com/blog/managing-software-snap-store-proxy)

As enterprises grapple with the evolving landscape of security threats, the need to safeguard internal networks from the broader internet is increasingly important. In...

[Holly Hall](https://canonical.com/blog/author/hollyhall)

15 January 2024
