LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-01-2017, 09:53 PM   #1
c0de3
LQ Newbie
 
Registered: Jun 2017
Posts: 13

Rep: Reputation: Disabled
Error in apt-get and postfix


Postfix won't start on my raspbain computer. Also about the same time my apt-get started to fail. I've include the details below:

Any thoughts as to what it might be?



pi@flav1:~ $ sudo journalctl -xn
-- Logs begin at Thu 2017-06-01 21:06:50 EDT, end at Thu 2017-06-01 21:10:42 EDT. --
Jun 01 21:10:40 flav1 postfix[1400]: Starting Postfix Mail Transport Agent: postfixSegmentation fault
Jun 01 21:10:40 flav1 systemd[1]: postfix.service: control process exited, code=exited status=139
Jun 01 21:10:40 flav1 systemd[1]: Failed to start LSB: Postfix Mail Transport Agent.
-- Subject: Unit postfix.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman.../systemd-devel
--
-- Unit postfix.service has failed.
--
-- The result is failed.
Jun 01 21:10:40 flav1 systemd[1]: Dependency failed for Mail Transport Agent.
-- Subject: Unit mail-transport-agent.target has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman.../systemd-devel
--
-- Unit mail-transport-agent.target has failed.
--
-- The result is dependency.
Jun 01 21:10:40 flav1 systemd[1]: Unit postfix.service entered failed state.
Jun 01 21:10:40 flav1 sudo[1394]: pam_unix(sudo:session): session closed for user root
Jun 01 21:10:41 flav1 sshd[1386]: Failed password for invalid user root from 111.73.46.198 port 2834 ssh2
Jun 01 21:10:42 flav1 sudo[1462]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/journalctl -xn
Jun 01 21:10:42 flav1 sudo[1462]: pam_unix(sudo:session): session opened for user root by pi(uid=0)

pi@flav1:~ $ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
udev
The following packages will be upgraded:
udev
1 upgraded, 0 newly installed, 0 to remove and 53 not upgraded.
5 not fully installed or removed.
Need to get 0 B/850 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 122659 files and directories currently installed.)
Preparing to unpack .../udev_215-17+deb8u7_armhf.deb ...
Segmentation fault
dpkg: error processing archive /var/cache/apt/archives/udev_215-17+deb8u7_armhf.deb (--unpack):
subprocess new pre-installation script returned error exit status 139
insserv: warning: script 'K01debian.noip2.sh' missing LSB tags and overrides
insserv: warning: script 'debian.noip2.sh' missing LSB tags and overrides
insserv: warning: script 'K01debian.noip2.sh' missing LSB tags and overrides
insserv: warning: script 'debian.noip2.sh' missing LSB tags and overrides
Errors were encountered while processing:
/var/cache/apt/archives/udev_215-17+deb8u7_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
 
Old 06-02-2017, 07:52 AM   #2
dejank
Member
 
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229

Rep: Reputation: Disabled
Segmentation fault should indicate that there is memory access violation. So, either give a shot at fsck, or try new SD card.
 
Old 06-02-2017, 04:38 PM   #3
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Hi c0de3,

Welcome to the forum!

Did you recently perform an upgrade?
 
Old 06-05-2017, 08:38 AM   #4
c0de3
LQ Newbie
 
Registered: Jun 2017
Posts: 13

Original Poster
Rep: Reputation: Disabled
Each weekend (or so) I run a apt-get update and a apt-get upgrade. It is very possible that I had done that shortly before this stopped working. The problem is it took me a day or so to notice it was done. I use this as a headless email server.

I'm going to have the memory card pulled from the device and brought to me this week. I was thinking I'd have to try and clone the card to a new one? Hopefully the segmentation fault doesn't break that also...

I'm open to any other tips or suggestions! Thanks!


Quote:
Originally Posted by AwesomeMachine View Post
Hi c0de3,

Welcome to the forum!

Did you recently perform an upgrade?
 
Old 06-05-2017, 08:58 AM   #5
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
When you next get a chance, run:

Code:
dpkg -l | grep -v '^.i'
This will show all the packages that are neither uninstalled or properly installed, and thus highlight packages that are in an improperly installed state.
 
Old 06-05-2017, 05:20 PM   #6
c0de3
LQ Newbie
 
Registered: Jun 2017
Posts: 13

Original Poster
Rep: Reputation: Disabled
Thanks for the assistance! Here is what that command produced:

Code:
pi@flav1:~ $ dpkg -l | grep -v '^.i'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                  Version                                   Architecture Description
+++-=====================================-=========================================-============-==================================================================================================
iU  libc-dev-bin                          2.19-18+deb8u9                            armhf        GNU C Library: Development binaries
iU  libc6-dbg:armhf                       2.19-18+deb8u9                            armhf        GNU C Library: detached debugging symbols
iU  libc6-dev:armhf                       2.19-18+deb8u9                            armhf        GNU C Library: Development Libraries and Header Files
iU  libtirpc1:armhf                       0.2.5-1+deb8u1                            armhf        transport-independent RPC library
iU  rpcbind                               0.2.1-6+deb8u2                            armhf        converts RPC program numbers into universal addresses
I'm afraid I don't know if this is good or bad, I'm guessing not great...





Quote:
Originally Posted by hydrurga View Post
When you next get a chance, run:

Code:
dpkg -l | grep -v '^.i'
This will show all the packages that are neither uninstalled or properly installed, and thus highlight packages that are in an improperly installed state.
 
Old 06-05-2017, 05:28 PM   #7
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Ok. Thanks. It looks possible that an upgrade command was interrupted somehow. The annoying thing is that these can be reasonably important packages.

Before we sort that out, can we just check your software sources?

cat /etc/apt/sources.list{,.d/*}
 
Old 06-05-2017, 06:04 PM   #8
c0de3
LQ Newbie
 
Registered: Jun 2017
Posts: 13

Original Poster
Rep: Reputation: Disabled
Here we go:


Code:
pi@flav1:~ $ cat /etc/apt/sources.list{,.d/*}
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
deb http://archive.raspberrypi.org/debian/ jessie main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ jessie main ui


Quote:
Originally Posted by hydrurga View Post
Ok. Thanks. It looks possible that an upgrade command was interrupted somehow. The annoying thing is that these can be reasonably important packages.

Before we sort that out, can we just check your software sources?

cat /etc/apt/sources.list{,.d/*}
 
Old 06-05-2017, 06:10 PM   #9
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Ok. I'm unused to the Raspbian repos but there certainly doesn't appear to be any distro version clashes in there. Good.

Let's start by using a small sledgehammer to crack a nut:

Code:
sudo apt-get install --reinstall libc-dev-bin
If that works, repeat for the other four files that were found to marked "iU".

If the initial reinstall fails, or all five reinstalls succeed, try the same command for the udev package.
 
Old 06-05-2017, 08:39 PM   #10
c0de3
LQ Newbie
 
Registered: Jun 2017
Posts: 13

Original Poster
Rep: Reputation: Disabled
Thanks for the continued help!

I ran the command on each of the iU entries. They all fail with:


$ sudo apt-get install --reinstall rpcbind
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
udev : Depends: libudev1 (= 215-17+deb8u6) but 215-17+deb8u7 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


So I tried it with udev, got something different with this one:

Code:
$ sudo apt-get install --reinstall udev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  udev
1 upgraded, 0 newly installed, 0 to remove and 53 not upgraded.
5 not fully installed or removed.
Need to get 0 B/850 kB of archives.
After this operation, 0 B of additional disk space will be used.
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 122659 files and directories currently installed.)
Preparing to unpack .../udev_215-17+deb8u7_armhf.deb ...
Segmentation fault
dpkg: error processing archive /var/cache/apt/archives/udev_215-17+deb8u7_armhf.deb (--unpack):
 subprocess new pre-installation script returned error exit status 139
insserv: warning: script 'K01debian.noip2.sh' missing LSB tags and overrides
insserv: warning: script 'debian.noip2.sh' missing LSB tags and overrides
insserv: warning: script 'K01debian.noip2.sh' missing LSB tags and overrides
insserv: warning: script 'debian.noip2.sh' missing LSB tags and overrides
Errors were encountered while processing:
 /var/cache/apt/archives/udev_215-17+deb8u7_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Quote:
Originally Posted by hydrurga View Post
Ok. I'm unused to the Raspbian repos but there certainly doesn't appear to be any distro version clashes in there. Good.

Let's start by using a small sledgehammer to crack a nut:

Code:
sudo apt-get install --reinstall libc-dev-bin
If that works, repeat for the other four files that were found to marked "iU".

If the initial reinstall fails, or all five reinstalls succeed, try the same command for the udev package.
 
Old 06-06-2017, 01:06 AM   #11
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Ok. The problem seems to be the No-IP script which is still trying to use pre-systemd commands when Debian is now systemd. I'm not quite sure why this has suddenly hit you now.

See https://askubuntu.com/questions/8352...my-init-script for a little info.

If it's ok with you, we need to strip out the No-IP stuff and then reattempt the reinstalls/upgrades.

Do you have any notes as to how you installed No-IP (links to instructions etc.?).

If not, see how this goes: http://tehgentoonoob.blogspot.co.uk/...n-xubuntu.html
 
Old 06-06-2017, 07:47 AM   #12
c0de3
LQ Newbie
 
Registered: Jun 2017
Posts: 13

Original Poster
Rep: Reputation: Disabled
Thanks I should be able to find the notes I worked from. I think I just followed their website. I'll try that tonight! Thanks for continuing to help!

I'll post back this evening.





Quote:
Originally Posted by hydrurga View Post
Ok. The problem seems to be the No-IP script which is still trying to use pre-systemd commands when Debian is now systemd. I'm not quite sure why this has suddenly hit you now.

See https://askubuntu.com/questions/8352...my-init-script for a little info.

If it's ok with you, we need to strip out the No-IP stuff and then reattempt the reinstalls/upgrades.

Do you have any notes as to how you installed No-IP (links to instructions etc.?).

If not, see how this goes: http://tehgentoonoob.blogspot.co.uk/...n-xubuntu.html
 
Old 06-06-2017, 06:55 PM   #13
c0de3
LQ Newbie
 
Registered: Jun 2017
Posts: 13

Original Poster
Rep: Reputation: Disabled
Okay, here are the directions I followed:

http://www.noip.com/support/knowledg...update-client/



So do I need to uninstall this or just stop the services? I know how to stop the services but I'm not sure how to uninstall it because I installed it via the make and make install? Any suggestions?





Quote:
Originally Posted by c0de3 View Post
Thanks I should be able to find the notes I worked from. I think I just followed their website. I'll try that tonight! Thanks for continuing to help!

I'll post back this evening.
 
Old 06-06-2017, 07:04 PM   #14
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
I would try and excise it as much as possible (you'll be reinstalling it afterwards).

Not being able to find uninstall instructions in the No-IP knowledge base, why don't you try working through the steps in that link I gave you http://tehgentoonoob.blogspot.co.uk/...n-xubuntu.html and see how much of it is relevant...
 
Old 06-06-2017, 07:30 PM   #15
c0de3
LQ Newbie
 
Registered: Jun 2017
Posts: 13

Original Poster
Rep: Reputation: Disabled
Okay, I stopped the process. Then I removed the scripts from all the rcx.d directory and the init.d directory.

Stopped that error, but still get this:
sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
udev
The following packages will be upgraded:
udev
1 upgraded, 0 newly installed, 0 to remove and 57 not upgraded.
5 not fully installed or removed.
Need to get 0 B/850 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 122659 files and directories currently installed.)
Preparing to unpack .../udev_215-17+deb8u7_armhf.deb ...
Segmentation fault
dpkg: error processing archive /var/cache/apt/archives/udev_215-17+deb8u7_armhf.deb (--unpack):
subprocess new pre-installation script returned error exit status 139
Errors were encountered while processing:
/var/cache/apt/archives/udev_215-17+deb8u7_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)






Quote:
Originally Posted by c0de3 View Post
Okay, here are the directions I followed:

http://www.noip.com/support/knowledg...update-client/



So do I need to uninstall this or just stop the services? I know how to stop the services but I'm not sure how to uninstall it because I installed it via the make and make install? Any suggestions?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apt-offline - ERROR: FATAL: Something is wrong with the apt system. czezz Ubuntu 4 05-26-2016 06:38 AM
Installing from apt-get fails often, apt-get update gives error, etc What should ido? mitchell7man Ubuntu 3 02-27-2012 03:55 AM
apt error after upgrade and 'apt-get -f install' does not sort it out zimgir Ubuntu 1 01-12-2012 11:09 PM
apt + readline + postfix + etc... Sapient Linux - Software 2 01-04-2006 10:03 AM
apt-get error installing xlibs 4.2.1-14, apt-get won't work at all now pib Debian 1 12-11-2003 12:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration