LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   very strange aptitude errors (https://www.linuxquestions.org/questions/linux-software-2/very-strange-aptitude-errors-385613/)

ronkymac 11-22-2005 05:24 PM

very strange aptitude errors
 
Evening all;

basically, server was working perfectly last night, and I decided that it would be nice to see how it would handle X; had an idea I could provide myself with an X session via SSH. aaah, well apt didn't like me - the install didn't work for some reason that still baffles me, and I can't get apt to work again. I just want to get back to my beautiful terminal!!

A bit of background info: server runs debain 2.4 (sarge), and there were a couple of notably strange things on the system. I searched Google for quite a while, and came up with http://lists.debian.org/debian-hppa/.../msg00007.html.
Having looked at /usr/bin/perl, I found it to be
* owned by upload (the account I use to upload stuff via FTP if need be :rolleyes: )
* chmod'd as rw-r--r--

so, then, I tried to install again, using apt, after having set /usr/bin/perl to chown root:root and chmod +x

Code:

debsrv:/usr/bin# apt-get upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
7 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue? [Y/n] y
/usr/sbin/dpkg-preconfigure: line 3: BEGIN: command not found
/usr/sbin/dpkg-preconfigure: line 1: qq{: command not found
/usr/sbin/dpkg-preconfigure: line 5: use: command not found
/usr/sbin/dpkg-preconfigure: line 6: use: command not found
/usr/sbin/dpkg-preconfigure: line 7: syntax error near unexpected token `('
/usr/sbin/dpkg-preconfigure: line 7: `          use Debconf::Log qw(:all);'
Setting up libssl0.9.7 (0.9.7e-3sarge1) ...
/usr/share/debconf/frontend: line 3: use: command not found
/usr/share/debconf/frontend: line 4: use: command not found
/usr/share/debconf/frontend: line 5: use: command not found
/usr/share/debconf/frontend: line 6: syntax error near unexpected token `('
/usr/share/debconf/frontend: line 6: `use Debconf::AutoSelect qw(:all);'
dpkg: error processing libssl0.9.7 (--configure):
 subprocess post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of fetchmail:
 fetchmail depends on libssl0.9.7; however:
  Package libssl0.9.7 is not configured yet.
dpkg: error processing fetchmail (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libclamav1:
 libclamav1 depends on libssl0.9.7; however:
  Package libssl0.9.7 is not configured yet.
dpkg: error processing libclamav1 (--configure):
 dependency problems - leaving unconfigured
Setting up libpango1.0-common (1.8.1-1) ...
/usr/share/debconf/frontend: line 3: use: command not found
/usr/share/debconf/frontend: line 4: use: command not found
/usr/share/debconf/frontend: line 5: use: command not found
/usr/share/debconf/frontend: line 6: syntax error near unexpected token `('
/usr/share/debconf/frontend: line 6: `use Debconf::AutoSelect qw(:all);'
dpkg: error processing libpango1.0-common (--configure):
 subprocess post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of openssl:
 openssl depends on libssl0.9.7; however:
  Package libssl0.9.7 is not configured yet.
dpkg: error processing openssl (--configure):
 dependency problems - leaving unconfigured
Setting up xfce4-session (0.1.3+20031213-5) ...
/usr/sbin/update-alternatives: line 3: =/var/lib/dpkg: No such file or directory
/usr/sbin/update-alternatives: line 4: =/usr/lib/dpkg: No such file or directory
/usr/sbin/update-alternatives: line 5: =1.10.28: command not found
/usr/sbin/update-alternatives: line 1: /enoent: No such file or directory
/usr/sbin/update-alternatives: line 28: =: command not found
/usr/sbin/update-alternatives: line 28: die: command not found
/usr/sbin/update-alternatives: line 29: syntax error near unexpected token `}'
/usr/sbin/update-alternatives: line 29: `sub ENOENT { $enoent; }'
dpkg: error processing xfce4-session (--configure):
 subprocess post-installation script returned error exit status 2
Setting up xterm (4.3.0.dfsg.1-14sarge1) ...
/usr/sbin/update-alternatives: line 3: =/var/lib/dpkg: No such file or directory
/usr/sbin/update-alternatives: line 4: =/usr/lib/dpkg: No such file or directory
/usr/sbin/update-alternatives: line 5: =1.10.28: command not found
/usr/sbin/update-alternatives: line 1: /enoent: No such file or directory
/usr/sbin/update-alternatives: line 28: =: command not found
/usr/sbin/update-alternatives: line 28: die: command not found
/usr/sbin/update-alternatives: line 29: syntax error near unexpected token `}'
/usr/sbin/update-alternatives: line 29: `sub ENOENT { $enoent; }'
dpkg: error processing xterm (--configure):
 subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
 libssl0.9.7
 fetchmail
 libclamav1
 libpango1.0-common
 openssl
 xfce4-session
 xterm
E: Sub-process /usr/bin/dpkg returned an error code (1)

Having googled extensively for a considerable length of time, I can say I'm no closer to working out the apt problem that the system seems to be suffering.

This is a bit of a stupid question, especially considering the fact that info on the system in question is pretty minimal; but would anyone know quite why the terminal should be chucking up this information?

:confused:

Emerson 11-23-2005 10:49 AM

Yes, apt-get won't work if there are half-installed packages. Haven't used Debian lately and cant racall the exact command, but you have to fix it with dpkg. 'man dpkg' will guide you.
Also, using 'apt-get upgrade' without preceding 'apt-get update' is asking for trouble. But you knew it, I guess?

ronkymac 11-23-2005 02:43 PM

aaaargh!! lol that might just be the answer to my question- nope, didn't know. I should have at least used some common sense, but it was late at night, right? :p

so.... the solution to the problem is probably one of those horribly complicated ones that means I might as well just do a complete reinstall - or is there any easy way of fixing this issue?

Regards.

Emerson 11-23-2005 03:34 PM

No need to reinstall. Just fix those 7 packages and run apt-get update && apt-get upgrade.

ronkymac 11-23-2005 03:36 PM

remove them?

Emerson 11-23-2005 03:57 PM

Yep. Use --force option with dpkg if necessary.

ronkymac 11-23-2005 04:12 PM

aaaargh still doesnt work!!

Code:

debsrv:/home/ronkymac# dpkg --force-all -r xfce4-session
(Reading database ... 44745 files and directories currently installed.)
Removing xfce4-session ...
/usr/sbin/update-alternatives: line 3: =/var/lib/dpkg: No such file or directory
/usr/sbin/update-alternatives: line 4: =/usr/lib/dpkg: No such file or directory
/usr/sbin/update-alternatives: line 5: =1.10.28: command not found
/usr/sbin/update-alternatives: line 1: /enoent: No such file or directory
/usr/sbin/update-alternatives: line 28: =: command not found
/usr/sbin/update-alternatives: line 28: die: command not found
/usr/sbin/update-alternatives: line 29: syntax error near unexpected token `}'
/usr/sbin/update-alternatives: line 29: `sub ENOENT { $enoent; }'
dpkg: error processing xfce4-session (--remove):
 subprocess pre-removal script returned error exit status 2
Errors were encountered while processing:
 xfce4-session



All times are GMT -5. The time now is 07:56 PM.