[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

how to get past apt-get errors? is there a manual workaround?



Hi debianites -- a question for DPKG and APT experts:

We're stuck with apt-get and haven't found a way past it yet -- any
ideas would be welcome:

Our postgresql-client-7.4 is missing its libpq.so.3 file, which means
that pg_controldata can't do its thing, so that anything related to
that debian package breaks/kills the whole apt process... meaning that
apt-get is broken! (Perhaps we had a blip during the ice storm last
month and this file wound up a casualty.)

Right now we aren't able to apt-get upgrade (or install or remove) at
all... And dselect hasn't been able to fix it either. :(

Is there a process where we can move some files around and then let
apt-get upgrade the package, and then we can remove the miscreant
package completely? Or is there another recommended workaround?


===
back story:

# apt-get upgrade
<snip>
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 42030 files and directories currently installed.)
Removing postgresql-7.4 ...
Stopping PostgreSQL 7.4 database server: mainError: pid file is
invalid, please manually kill the stale server process.
 failed!
invoke-rc.d: initscript postgresql-7.4, action "stop" failed.
dpkg: error processing postgresql-7.4 (--remove):
 subprocess pre-removal script returned error exit status 1
Starting PostgreSQL 7.4 database server:
main/usr/lib/postgresql/7.4/bin/pg_controldata: error while loading
shared libraries: libpq.so.3: cannot open shared object file: No such
file or directory
Error: Could not parse locale out of pg_controldata output
 failed!
invoke-rc.d: initscript postgresql-7.4, action "start" failed.
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 postgresql-7.4
E: Sub-process /usr/bin/dpkg returned an error code (1)



postgres v7 is not running (but v8 is):

# /etc/init.d/postgresql-8.1 start
Starting PostgreSQL 8.1 database server: main.

# ps f `pgrep post`
  PID TTY      STAT   TIME COMMAND
  627 ?        S      0:00 /usr/lib/postgresql/8.1/bin/postmaster
  795 ?        S      0:00  \_ postgres: writer process
  796 ?        S      0:00  \_ postgres: stats buffer process
  797 ?        S      0:00      \_ postgres: stats collector process



There's no pidfile for v7 despite what the errors say:

# ls -lA /var/run/postgresql/
total 8
-rw------- 1 postgres postgres  5 2009-01-28 21:31 8.1-main.pid
srwxrwxrwx 1 postgres postgres  0 2009-03-11 14:26 .s.PGSQL.5432=
-rw------- 1 postgres postgres 34 2009-03-11 14:26 .s.PGSQL.5432.lock

(interesting how the timestamp on the pid file is january 28 even tho
the process we just started the process moments ago...?)



# locate libpq.so.3
<nothing>
# locate libpq.so
/usr/lib/libpq.so.4.1
/usr/lib/libpq.so.4

(and there's nothing in lost+found on the partition where /usr/lib is
located...)

-- 
will trillich -- http://faq.serensoft.com/
With a burning "yes" around your high priorities you can easily say
"no" to things that are urgent but not important. -- S. Covey


Reply to: