Having trouble updating/upgrading


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Having trouble updating/upgrading
# 1  
Old 02-10-2020
Having trouble updating/upgrading

For some reason I am having trouble upgrading and updating with apt-get:


Code:
rob@linux0:~$ sudo apt-get upgrade
[sudo] password for rob: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libgl1-mesa-dri libxatracker2 linux-generic linux-generic-hwe-18.04 linux-headers-generic
  linux-headers-generic-hwe-18.04 linux-image-generic linux-image-generic-hwe-18.04 mesa-va-drivers mesa-vdpau-drivers
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
4 not fully installed or removed.
Need to get 0 B/1,926 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: error processing package python-samba (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
dpkg: dependency problems prevent configuration of samba-common-bin:
 samba-common-bin depends on python-samba; however:
  Package python-samba is not configured yet.

So I tried: `sudo dpkg --configure -a`
and it returned:


Code:
dpkg: error processing package python-samba (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 python-samba

So I tried `sudo apt-get remove -y python-samba`
and it returned:
Code:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  python-ldb python-tdb
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  libnss-winbind python-samba samba-common-bin winbind
0 upgraded, 0 newly installed, 4 to remove and 10 not upgraded.
4 not fully installed or removed.
After this operation, 18.3 MB disk space will be freed.
(Reading database ... 255157 files and directories currently installed.)
Removing libnss-winbind:amd64 (2:4.7.6+dfsg~ubuntu-0ubuntu2.15) ...
Removing winbind (2:4.7.6+dfsg~ubuntu-0ubuntu2.15) ...
Removing samba-common-bin (2:4.7.6+dfsg~ubuntu-0ubuntu2.15) ...
dpkg: error processing package python-samba (--remove):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
Errors were encountered while processing:
 python-samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

It failed but I figured I would try to install again anyhow with `sudo apt-get install -y python-samba`
and it returned:
Code:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-samba is already the newest version (2:4.7.6+dfsg~ubuntu-0ubuntu2.15).
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,926 kB of archives.
After this operation, 0 B of additional disk space will be used.
dpkg: error processing package python-samba (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Errors were encountered while processing:
 python-samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

I then tried to force an upgrade `sudo apt-get upgrade -f`
and it returned:
Code:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libgl1-mesa-dri libxatracker2 linux-generic linux-generic-hwe-18.04 linux-headers-generic
  linux-headers-generic-hwe-18.04 linux-image-generic linux-image-generic-hwe-18.04 mesa-va-drivers mesa-vdpau-drivers
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,926 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: error processing package python-samba (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 python-samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

So I tried to force install python-samba and it gave me the same error. I am not sure what to do here.
# 2  
Old 02-11-2020
My first thoughts:
  • You can try manually installing python-samba (without using apt).
  • You can try installing samba differently (a different distro for python), for example apt-get install python-smb

I use apt on Ubuntu, but when I run into problems I don't waste much time with apt (I use it as a tool, not as a rule), and go for manual installation.

The questions is, where is the python-samba distro for manual installation? I searched around a bit for you and could not find it.
# 3  
Old 02-11-2020
TBH I can't even seem to get rid of samba:


Code:
rob@linux:~$ sudo apt-get remove samba --purge
[sudo] password for rob: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  attr ibverbs-providers libcephfs2 libibverbs1 libllvm8 libnl-route-3-200 librados2 libuser1 python-dnspython
  python-libuser samba-dsdb-modules samba-vfs-modules tdb-tools
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  samba* system-config-samba*
0 upgraded, 0 newly installed, 2 to remove and 3 not upgraded.
4 not fully installed or removed.
Need to get 0 B/1,926 kB of archives.
After this operation, 15.9 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 267456 files and directories currently installed.)
Removing system-config-samba (1.2.63-0ubuntu6) ...
Removing samba (2:4.7.6+dfsg~ubuntu-0ubuntu2.15) ...
dpkg: error processing package python-samba (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
dpkg: dependency problems prevent configuration of samba-common-bin:
 samba-common-bin depends on python-samba; however:
  Package python-samba is not configured yet.

dpkg: error processing package samba-common-bin (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Errors were encountered while processing:
 python-samba
 samba-common-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)

# 4  
Old 02-11-2020
Can you try force removal of mentioned packages using dpkg ?
After that, if packages are removed, run apt-get install -f

Hopefully that will help, if not post output of those commands above.

I cannot agree with manual work on ubuntu, exceptions being stuff outside repositories (the official ones).
If you really want manual work (no package or rudimental package manager), then other distributions would be better choice.

Of course, above really depends on the context and significance of those box(es).

Regards
Peasant.
# 5  
Old 02-11-2020
It all seems fine now:



Code:
sudo dpkg -P samba samba-common-bin samba-common smbclient

followed by:
Code:
sudo rm -f /etc/rc*.d/*samba /etc/init.d/samba

then:
Code:
rob@linux:/$ sudo apt-get install --reinstall python-samba
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  attr ibverbs-providers libcephfs2 libibverbs1 libllvm8 libnl-route-3-200 librados2 libuser1 python-dnspython
  python-libuser samba-dsdb-modules samba-vfs-modules tdb-tools
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,926 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 266034 files and directories currently installed.)
Preparing to unpack .../python-samba_2%3a4.7.6+dfsg~ubuntu-0ubuntu2.15_amd64.deb ...
Unpacking python-samba (2:4.7.6+dfsg~ubuntu-0ubuntu2.15) over (2:4.7.6+dfsg~ubuntu-0ubuntu2.15) ...
Setting up python-samba (2:4.7.6+dfsg~ubuntu-0ubuntu2.15) ...

This User Gave Thanks to Circuits For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Problem Upgrading OS

Hi I've just upgraded OS - using "Migration with nimadm". The Nim master is a Power 6 server, and the source is 6100-09-04-1441. The migration was successful with a Power 6 - Nim client, but there was a problem with Power 5 - Nim client : the OS remained 6100-00-09-0920 icapp1:/]oslevel -s... (1 Reply)
Discussion started by: bobochacha29
1 Replies

2. AIX

Upgrading from aix 5.3 to ?

Hey guys, since AIX 5.3 reaches EOS on april 2012, I really need to update my systems asap. Any experience on upgrading directly to 7.1, with sap/db2/oracle? could do fresh installs and import my sap/db vgs, but this would be a lot of work cheers Funksen (4 Replies)
Discussion started by: funksen
4 Replies

3. AIX

Upgrading OS from 5.2 to 5.3

We currently have test and production servers running AIX 5.2, DB2 8.1(Prod), DB2 8.2(Test),Websphere 6.1 on both. We need to upgrade to DB2 to version 9, but to do that we also need to upgrade the operating system to 5.3 and go from 32 bit kernel to 64 bit kernal. Looking for information on any... (3 Replies)
Discussion started by: jyoung
3 Replies

4. Shell Programming and Scripting

awk updating one file with another, comparing, updating

Hello, I read and search through this wonderful forum and tried different approaches but it seems I lack some knowledge and neurones ^^ Here is what I'm trying to achieve : file1: test filea 3495; test fileb 4578; test filec 7689; test filey 9978; test filez 12300; file2: test filea... (11 Replies)
Discussion started by: mecano
11 Replies

5. Red Hat

upgrading packages

Hello, I am using Redhat Linux Enterprise 4 AS. To upgrade NFS, I had to browse the internet and finally I got the latest rpm https://rhn.redhat.com/errata/RHBA-2005-727.html That was a time-consuming procedure. On Solaris, I am used to go to sunfreeware.sun.com and download the latest... (3 Replies)
Discussion started by: melanie_pfefer
3 Replies

6. AIX

Upgrading from 5.1.0.0 to 5.2.0.0

As a fairly new Administrator to AIX i am a little leary of the OS upgrade I need to do on one of our servers. I have already upgraded the microcode to the lastest level and now need to do the OS. I have the docs and discs from IBM and have determined that I dont want to do a new installation but... (5 Replies)
Discussion started by: Target
5 Replies

7. UNIX for Dummies Questions & Answers

upgrading apache

How can I find out what options were used to build the apache currently running on my computer? I'd like to upgrade and want to make sure not to break any sites running on it. I've been going through the sites to figure out just what is needed, but want to be sure not to miss anything before... (2 Replies)
Discussion started by: lungs
2 Replies

8. Solaris

upgrading to solaris 9

Hey All We are having ORacle 8.1.7 and ORacle 9.2.0.4 installed in our Sun sparc Servers(oON SOLARIS 8). We are going to upgrade our servers to SOLARIS Ver 9 Solaris ver 9 supports the above mentioned Oracle versions. Can any one help me out how to upgrade from solaris 8 to solaris 9. ... (2 Replies)
Discussion started by: solaris8in
2 Replies

9. HP-UX

Upgrading a B1000

Hi all I have a HP B1000 with HP-UX 11 installed but recently I have aqquired 11i on CD, after reading the documentation it states that 11i can be installed on a B1000 with a firmware update, which is included on the 11i media, but I have been told it will be impossible to install 11i on my... (3 Replies)
Discussion started by: NemesisXP
3 Replies

10. UNIX for Dummies Questions & Answers

Upgrading to PHP 4.3.4 from 4.2.2

ok im trying to upgrade but i keep geting an error and 1 says it ned the other to install but nethere will install heres what im getting now though now i have 4.2.2-17.2 installed now do i have to unintall everything to get this to install or how do i go about it thank you for your help (3 Replies)
Discussion started by: Blackrose
3 Replies
Login or Register to Ask a Question