Problem with apt / dpkg

Tim Frost timfrost at xtra.co.nz
Tue Jun 2 10:05:58 UTC 2009


Michael,

The errors you are getting indicate that the post-install and pre-remove
scripts are trying to run a command (myodbc-installer) that relies on
libraries that aren't present. 


WARNING: The advice below is risky - the partially-completed install
process will have made changes to your system which may not be correctly
reversed, if you follow these instructions.

On Mon, 2009-06-01 at 16:54 -0500, Michael Satterwhite wrote:

> Removing mysql-connector-odbc ...
> myodbc-installer: error while loading shared libraries: libltdl.so.3:
> cannot open shared object file: No such file or directory
> myodbc-installer: error while loading shared libraries: libltdl.so.3:
> cannot open shared object file: No such file or directory
> dpkg: error processing mysql-connector-odbc (--purge):
> subprocess pre-removal script returned error exit status 127


> chown: invalid user: `mysqldev:mysqldev'
> chown: invalid user: `mysqldev:mysqldev'
> chown: invalid user: `mysqldev:mysqldev'
> myodbc-installer: error while loading shared libraries: libltdl.so.3:
> cannot open shared object file: No such file or directory
> myodbc-installer: error while loading shared libraries: libltdl.so.3:
> cannot open shared object file: No such file or directory
> dpkg: error while cleaning up:
> subprocess post-installation script returned error exit status 127


> Errors were encountered while processing:
> mysql-connector-odbc
> 

WARNING: the following may leave files in your system directories that
are not managed by any package, and may cause other failures because
actions that were successful during the initial install are not
correctly reversed.  I strongly advise that you review what the scripts
are doing, and verify that any actions that were successful are
correctly reversed.  Note that the purge operation should remove both
scripts, so you need to save copies (in a place that won't be affected,
such as your home directory) before attempting the purge.

Locate the scripts - they should be in directory /var/lib/dpkg/info/,
with names 
	mysql-connector-odbc.postinst
	mysql-connector-odbc.prerm

Edit both scripts, so that the first non-comment line reads 'exit 0'.
This will cause both scripts to do nothing, but report successful
operation.

You can then retry the purge operation. The removal of the package will
be deemed successful, so you will then be able to resume other package
operations.


Things that you may have to manually fix include:
* re-running ldconfig to build the cache of available libraries
* removal of users or groups
* removal of init scripts
* removal of configuration files or directories
* removal of references to the mysql connector from ODBC configurations
* setting of ownership and permissions of shared configuration files
	 or directories




Tim

-- 
Tim Frost <timfrost at xtra.co.nz>





More information about the ubuntu-users mailing list