always install -dev packages?

Asked by Barry Warsaw

Is there a way to tell Ubuntu's package manager(s), "hey, I'm a developer, I always want the -dev package to be installed when I install the corresponding non-dev package"? This would be really handy as I'm always finding out that stuff doesn't build the way I expect it to because I've got the libfoo package but not the libfoo-dev package.

Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Frode M. Døving (frode) said :

There is no such feature that i'm aware of.

Revision history for this message
Vincenzo Consales (aquarius987) said :

Maybe this script could be useful for you:


if [ ! -n "$1" ]
echo "Search Parameters missing!! Exiting!"
exit $E_ERR_ARG

for arg in "$@"
#echo $arg
apt-cache search --names-only $arg|grep "\-dev"|awk '{ print $1 }'

this script print the list of -dev packages related to the packages passed to the script. You could be able to redirect the output to the apt-get install command but i don't know why this don't work; However, you can use the output of this script to have an install list of the packages you want.

if you decomment the line "echo $arg" the script print also the package names passed from the standard input.

Revision history for this message
Andrew Smith (asmith16) said :

I also wrote a script to deal with this problem, hopefully it will help people who run into it:

Can you help with this problem?

Provide an answer of your own, or ask Barry Warsaw for more information if necessary.

To post a message you must log in.