Drwright is not included in the main Ubuntu distribution but is availble through a PPA.
In this way installation steps:
sudo add-apt-repository ppa:drwright/stable
sudo apt-get update
sudo apt-get install drwright
Installation completed succesfully.
But I want correct the source code of this program. I use
apt-get source drwright
to download it. And first of all I try compile the source code without changes:
./configure
But configure doesn’t execute:
configure: error: Package requirements (
glib-2.0 >= 2.31.13
gio-2.0 >= 2.31.13
gdk-pixbuf-2.0 >= 2.25.3
gtk+-3.0 >= 3.0.0
libcanberra-gtk3 >= 0
libnotify >= 0.7
x11) were not met:
No package 'glib-2.0' found
No package 'gio-2.0' found
No package 'gdk-pixbuf-2.0' found
No package 'gtk+-3.0' found
No package 'libcanberra-gtk3' found
No package 'libnotify' found
No package 'x11' found
Why Drwring installed from PPA and work succesfully, but I can’t compile it from source code?
Header Files
To build a program from source, you don’t just need the compiled binaries for the libraries it uses. You also need their header files.
In Debian, Ubuntu, and other Debian-based operating systems, header files are provided by packages whose names end in
-dev. Usually it’s the binary package name with-devappended, or the binary package name with some version numbers removed and-devappended.-devpackages (for compiling) should not be confused with-dbgpackages (for debugging). Here’s some information about how and why these packages are made.pkg-config Packages vs. Your Package Manager’s Packages
When you build from source code and
./configuretells you about missing packages, usually it is not checking with the package manager to see what is installed, and the names of missing packages typically are not the exact names of the packages you need to install with your package manager. (pkg-config is a common way for./configurescripts to calculate dependencies–see this article, the manpage, and the project page for more information.)Figuring Out What Packages to Install with the Package Manager
To find out what packages you do need to install, you can look at packages that start the same…or that start with
libfollowed by the name of the "packages" spit out by./configure. Packages starting withlibare more common (on Debian and Debian-based systems) since most library packages are named that way.You can search for packages online (other distributions typically also provide this, here’s Debian’s). Or you can use bash completion to find them. Since this uses the locally stored information on your system about what packages are available in what versions from where, you should update that information first:
Then type in a command that would install a package, with just the beginning of the name–however much you think you know. For example, for
glib-2.0:There, I did not run the command I entered. (It wouldn’t have succeeded if I had, both because there is no package called
libglib2and becauseapt-get installwill not succeed unless run as root.)Instead, I pressed Tab a couple times at the end of the line, and I got a list of suggestions.
From these suggestions, the right one is
libglib2.0-dev.If You’re Still Not Sure
Sometimes you won’t necessarily know which one is right; then you can use
apt-cache show ...to find out. For example, suppose I’m wondering if I also needlibglib2.0-cil-dev:If you want, you can use command-line completion on incomplete package names as arguments to
apt-cache showinstead ofapt-get install. Any command that takes the name of a package (and takes it whether the package is installed or not) is suitable for this purpose.The Specific Packages You Need
Given the messages that appeared, the
-devpackages you need are probably:libglib2.0-dev Install libglib2.0-dev http://hostmar.co/software-small
libgdk-pixbuf2.0-dev Install libgdk-pixbuf2.0-dev http://hostmar.co/software-small (provides "gdk-pixbuf-2.0" headers)
libgtk-3-dev Install libgtk-3-dev http://hostmar.co/software-small (provides "gtk+-3.0" headers)
libcanberra-gtk3-dev Install libcanberra-gtk3-dev http://hostmar.co/software-small (provides "libcanberra-gtk3" headers)
libnotify-dev Install libnotify-dev http://hostmar.co/software-small (provides "libnotify" headers)
libx11-dev Install libx11-dev http://hostmar.co/software-small (provides "x11" headers)
You can install these in the Software Center but I recommend the command-line as it’s easier for installing multiple packages: