FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 03-11-2009, 08:26 PM
will trillich
 
Default 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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-11-2009, 10:08 PM
will trillich
 
Default how to get past apt-get errors? is there a manual workaround?

apt-get clean (and autoclean) don't seem to help any, either.

argh!


On Wed, Mar 11, 2009 at 3:26 PM, will trillich <will@serensoft.com> wrote:
> 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
>



--
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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-12-2009, 02:53 AM
Daniel Burrows
 
Default how to get past apt-get errors? is there a manual workaround?

On Wed, Mar 11, 2009 at 03:26:39PM -0600, will trillich <will@serensoft.com> was heard to say:
> 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.)

Your problem has to do with postgresql, not apt. I would guess that
maybe apt was trying to remove the old postgresql, and it got as far
as removing libpq.so.3 but didn't manage to remove postgresql for some
reason (maybe exactly the same reason it can't remove it now). I think
it should remove postgresql before the libraries it requires ... but I
have seen it make poor (less robust) decisions about how to actually
execute an install in the past.

> 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!

Ouch. What version of Debian are you running? The oldest version of
libpq I can find in the archive is libpq4 (from etch), and lenny only
has libpq5! I was going to suggest downloading libpq3 and installing
it manually, but you can't do that if you don't have it. I might also
try editing /var/lib/dpkg/info/postgresql-7.4.prerm and commenting out
the block where it checks for the old pid file. That's assuming, of
course, that you're really sure that there are no running servers (I
assume that the script has a good reason for trying to stop the server)

Daniel


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 12:18 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org