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

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Frode M. Døving (frode) said :
#1

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

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

Maybe this script could be useful for you:

#!bin/sh

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

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

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 :
#3

I also wrote a script to deal with this problem, hopefully it will help people who run into it: http://littlesvr.ca/grumble/2012/12/12/install-all-the-dev-and-doc-packages-in-debianubuntumint/

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.