On my development machine, I have /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20; on a fresh install of Ubuntu 14.04 I have /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19. I'm taking my first baby steps into creating a DEB file to install my application, and it works to install the app itself, now I would like my DEB file to also install the necessary shared libraries (like libstdc++.so.6.0.20).

The library is installed from package libstdc++6, but the default repositories don't have the right version, I have to add the ppa:ubuntu-toolchain-r/test repository to get the right version.

It seems like I need to add the line

Depends: libstdc++6:amd64 (= 4.9.2-0ubuntu1~14.04)

to my DEBIAN/control file, but it seems like that can't work without also telling it about the repository, and I can't figure out how to do that.

Or am I barking up the completely wrong tree? I guess I'm assuming that if I correctly set up a dependency on libstdc++6, it will go out to the Internet and download it for me, as part of my DEB installer?

Thanks, Chris

p.s. My DEB installer will only be used in-house, it will be copied onto the target machine from a USB stick or similar, it will never be downloaded from the Internet ...


A package can depend on any version of another package, but the package management system will only be able to install that dependency if it is in the enabled repositories. So you will have to add that PPA to the target system before installing your package.Your installation instructions will look like this:

sudo add-apt-repository ppa:...
sudo apt-get update
# Followed by preferred means of installing your package 

Also checkout How can I install software or packages without Internet (offline)? to see ways of setting up a small repository on the USB drive, so that all the dependencies are included in it directly without having to add a PPA.

(You shouldn't have to specify the architecture in the dependency, by the way.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.