[Gdal-dev] uninstalling/upgrading gdal

Adam Nowacki nowak at xpam.de
Wed May 2 14:55:09 EDT 2007


Frank Warmerdam wrote:
> Richard Greenwood wrote:
>> I had built and installed gdal 1.3 on a linux computer, and recently
>> did a build and install of 1.4 on the same computer. Daniel Morissette
>> suggested that that might be the cause of some anomalies I am
>> experiencing with mapserver. So my question - should I have
>> uninstalled gdal 1.3 prior to installing 1.4, and if so, how should
>> that be done?
> 
> Rich,
> 
> There is no mechanism to uninstall GDAL.  If you install them in the
> same place (ie. /usr/local) the last installed will normally take 
> precidence
> over older installs.  Problems with duplication are usually most ugly when
> you have copies of GDAL in different places. Such as one in /usr/lib and
> on in /usr/local/lib.  Then it is easy to have a case where you build 
> against
> one set of include files, but end up picking up a different libgdal.so at
> runtime.
> 
> Best regards,

This is why I usually build gdal with --prefix=/opt/... so that every 
gdal file goes into that directory. Later I can just delete that 
directory to uninstall. As for apps using gdal you can either point them 
to specific version using --with-gdal or similar, or create links in 
/usr/local. Because each link will point to /opt/... it is easy to 
identify and remove them using find.

To create links:
lndir -ignorelinks /opt/gdal-cvs20061215_p4_linux /usr/local

To remove links:
find /usr/local -lname '/opt/gdal-cvs20061215_p4_linux*' -exec 'rm' '{}' ';'



More information about the Gdal-dev mailing list