On Thu, Feb 14, 2008 at 08:55:05AM +0800, hhding wrote: > Assume I have installed gcc-4.1 with version 4.1.2-15, and some > application need gcc with version greater than 4.1.2-18. How can I check > and compare the installed gcc version in debian way then decide install > the new version or not? I have read the debian policy manual, but no > version compare tool or command is mentioned.
if dpkg --compare-versions 4.1.2-18 gt 4.1.2-15;then echo 4.1.2-18 is more than 4.1.2-15;fi This prints: 4.1.2-18 is more than 4.1.2-15 HTH. Kumar -- Kumar Appaiah, 458, Jamuna Hostel, Indian Institute of Technology Madras, Chennai - 600 036
signature.asc
Description: Digital signature