[SOLVED] lsb_release - no modules / python3 dependency issues

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
pres b.
Level 1
Level 1
Posts: 19
Joined: Mon Jul 20, 2009 9:11 pm

[SOLVED] lsb_release - no modules / python3 dependency issues

Postby pres b. » Thu May 18, 2017 10:59 am

Hello Everyone and thank you in advance for any insights. To keep this post from being long winded I am just going to list out what is going on (Linux Mint 18.1 Serena):

- Tried to add ppa using command below and got an error:

Code: Select all

pres@brolic ~ $ sudo add-apt-repository ppa:team-xbmc/ppa
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1551, in <module>
    codename = config_parser.get("general", "base_codename")
  File "/usr/lib/python2.7/ConfigParser.py", line 330, in get
    raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'general'


- After looking around (this whole thing is a blur now) I thought that error may have been tied to lsb_release and started 'messing things up'. Thought the error with lsb_release may have been tied to python3 and made the following change to the lsb_release file:
#! /usr/bin/python3 -Es changed to #! /usr/bin/python2.7 -Es

- Still couldn't add the repo or configure python (get to that later) so I ran:

Code: Select all

sudo apt-get install update-manager-core


Which gave me the following output:

Code: Select all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  python3-distupgrade python3-update-manager
  ubuntu-release-upgrader-core
The following NEW packages will be installed:
  python3-distupgrade python3-update-manager
  ubuntu-release-upgrader-core update-manager-core
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 171 kB of archives.
After this operation, 1,365 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3-update-manager all 1:16.04.6 [31.7 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3-distupgrade all 1:16.04.21 [104 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 ubuntu-release-upgrader-core all 1:16.04.21 [29.3 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 update-manager-core all 1:16.04.6 [5,332 B]
Fetched 171 kB in 0s (203 kB/s)             
Selecting previously unselected package python3-update-manager.
(Reading database ... 499520 files and directories currently installed.)
Preparing to unpack .../python3-update-manager_1%3a16.04.6_all.deb ...
Unpacking python3-update-manager (1:16.04.6) ...
Selecting previously unselected package python3-distupgrade.
Preparing to unpack .../python3-distupgrade_1%3a16.04.21_all.deb ...
Unpacking python3-distupgrade (1:16.04.21) ...
Selecting previously unselected package ubuntu-release-upgrader-core.
Preparing to unpack .../ubuntu-release-upgrader-core_1%3a16.04.21_all.deb ...
Unpacking ubuntu-release-upgrader-core (1:16.04.21) ...
Selecting previously unselected package update-manager-core.
Preparing to unpack .../update-manager-core_1%3a16.04.6_all.deb ...
Unpacking update-manager-core (1:16.04.6) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up lsb-core (9.20160110ubuntu0.2) ...
Traceback (most recent call last):
  File "/usr/bin/py3compile", line 291, in <module>
    main()
  File "/usr/bin/py3compile", line 252, in main
    pkg_files = tuple(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 56, in from_package
    stdout = str(stdout, 'utf-8')
TypeError: str() takes at most 1 argument (2 given)
dpkg: error processing package lsb-core (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python3-distupgrade (1:16.04.21) ...
Traceback (most recent call last):
  File "/usr/bin/py3compile", line 291, in <module>
    main()
  File "/usr/bin/py3compile", line 271, in main
    options.force, options.optimize, e_patterns)
  File "/usr/bin/py3compile", line 155, in compile
    for fn, versions_to_compile in filter_files(files, e_patterns, versions):
  File "/usr/bin/py3compile", line 107, in filter_files
    for fn in files:
  File "/usr/share/python3/debpython/files.py", line 73, in filter_public
    for fn in files:
  File "/usr/share/python3/debpython/files.py", line 56, in from_package
    stdout = str(stdout, 'utf-8')
TypeError: str() takes at most 1 argument (2 given)
dpkg: error processing package python3-distupgrade (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of ubuntu-release-upgrader-core:
 ubuntu-release-upgrader-core depends on python3-distupgrade (= 1:16.04.21); however:
  Package python3-distupgrade is not configured yet.

dpkg: error processing package ubuntu-release-upgrader-core (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-manager-core:
 update-manager-core depends on ubuntu-release-upgrader-core; however:
  Package ubuntu-release-upgrader-core is not configured yet.

dpkg: error processing package update-manager-core (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-update-manager:
 python3-update-manager depends on python3-distupgrade; however:
  Package python3-distupgrade is not configured yet.

dpkg: error processing package python3-update-manager (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 lsb-core
 python3-distupgrade
 ubuntu-release-upgrader-core
 update-manager-core
 python3-update-manager
E: Sub-process /usr/bin/dpkg returned an error code (1)


- "inxi -r" returns the following:

Code: Select all

Repos:     Active apt sources in file: /etc/apt/sources.list.d/clipgrab-team-ppa-xenial.list
           deb http://ppa.launchpad.net/clipgrab-team/ppa/ubuntu xenial main
           deb-src http://ppa.launchpad.net/clipgrab-team/ppa/ubuntu xenial main
           Active apt sources in file: /etc/apt/sources.list.d/graphics-drivers-ppa-xenial.list
           deb http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial main
           deb-src http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial main
           Active apt sources in file: /etc/apt/sources.list.d/linrunner-tlp-xenial.list
           deb http://ppa.launchpad.net/linrunner/tlp/ubuntu xenial main
           deb-src http://ppa.launchpad.net/linrunner/tlp/ubuntu xenial main
           Active apt sources in file: /etc/apt/sources.list.d/maarten-baert-simplescreenrecorder-xenial.list
           deb http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu xenial main
           deb-src http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu xenial main
           Active apt sources in file: /etc/apt/sources.list.d/official-package-repositories.list
           deb http://packages.linuxmint.com serena main upstream import backport #id:linuxmint_main
           deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
           deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
           deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
           deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
           deb http://archive.canonical.com/ubuntu/ xenial partner
           Active apt sources in file: /etc/apt/sources.list.d/opera-stable.list
           deb https://deb.opera.com/opera-stable/ stable non-free #Opera Browser (final releases)
           Active apt sources in file: /etc/apt/sources.list.d/opera.list
           deb http://deb.opera.com/opera/ stable non-free #Opera Browser (final releases)
           Active apt sources in file: /etc/apt/sources.list.d/rvm-smplayer-xenial.list
           deb http://ppa.launchpad.net/rvm/smplayer/ubuntu xenial main
           deb-src http://ppa.launchpad.net/rvm/smplayer/ubuntu xenial main
           Active apt sources in file: /etc/apt/sources.list.d/soylent-tv-screenstudio-xenial.list
           deb http://ppa.launchpad.net/soylent-tv/screenstudio/ubuntu xenial main
           deb-src http://ppa.launchpad.net/soylent-tv/screenstudio/ubuntu xenial main
           Active apt sources in file: /etc/apt/sources.list.d/teejee2008-ppa-xenial.list
           deb http://ppa.launchpad.net/teejee2008/ppa/ubuntu xenial main
           deb-src http://ppa.launchpad.net/teejee2008/ppa/ubuntu xenial main
 


- "lsb_release -sc" returns:

Code: Select all

  File "/usr/bin/lsb_release", line 64
    print("No LSB modules are available.", file=sys.stderr)
                                               ^
SyntaxError: invalid syntax
 


Any help at all is greatly appreciated. Thank you
Last edited by pres b. on Sat May 20, 2017 12:40 pm, edited 2 times in total.

User avatar
WharfRat
Level 18
Level 18
Posts: 8686
Joined: Thu Apr 07, 2011 8:15 pm

Re: lsb_release - no modules / python3 dependency issues

Postby WharfRat » Thu May 18, 2017 9:41 pm

You're going way off the rails here modifying lsb_release and attempting to install update-manager-core :?

I don't have update-manager-core installed and everything is working properly.

Change the shebang line in lsb_release back to #!/usr/bin/python3 -Es which is what it should be.

Have you changed python's configuration in any way like installing anything outside of the package manager :?:
Image Image Image

pres b.
Level 1
Level 1
Posts: 19
Joined: Mon Jul 20, 2009 9:11 pm

Re: lsb_release - no modules / python3 dependency issues

Postby pres b. » Fri May 19, 2017 12:38 pm

WharfRat wrote:You're going way off the rails here modifying lsb_release and attempting to install update-manager-core :?

I don't have update-manager-core installed and everything is working properly.

Change the shebang line in lsb_release back to #!/usr/bin/python3 -Es which is what it should be.

Have you changed python's configuration in any way like installing anything outside of the package manager :?:


Don't think I installed anything 'extra' for python. I may have made a symbolic link at some point since I wanted to update the version of Python that Idle was using (wanted 3.5 instead of 2.7.)

I just tried the following:

Tried to configure using command line and got:

Code: Select all

pres@brolic ~ $ sudo dpkg --configure python3
dpkg: error processing package python3 (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 python3


Tried to reinstall using command line:

Code: Select all

pres@brolic ~ $ sudo apt-get --reinstall install python3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
6 not fully installed or removed.
Need to get 0 B/8,710 B of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 499624 files and directories currently installed.)
Preparing to unpack .../python3_3.5.1-3_amd64.deb ...
  File "/usr/bin/py3clean", line 4
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
  File "/usr/bin/py3clean", line 4
SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
dpkg: error processing archive /var/cache/apt/archives/python3_3.5.1-3_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Traceback (most recent call last):
  File "/usr/bin/py3compile", line 291, in <module>
    main()
  File "/usr/bin/py3compile", line 252, in main
    pkg_files = tuple(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 56, in from_package
    stdout = str(stdout, 'utf-8')
TypeError: str() takes at most 1 argument (2 given)
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/python3_3.5.1-3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


Tried to reinstall with Synaptic and got following error:

Code: Select all

E: /var/cache/apt/archives/python3_3.5.1-3_amd64.deb: subprocess new pre-removal script returned error exit status 1

User avatar
WharfRat
Level 18
Level 18
Posts: 8686
Joined: Thu Apr 07, 2011 8:15 pm

Re: lsb_release - no modules / python3 dependency issues

Postby WharfRat » Fri May 19, 2017 1:56 pm

The problem with python is you need a working python to install python so it's sort of like the chicken/egg conundrum and about as easy to fix as putting toothpaste back in the tube.

First of all how many python packages are installed apt search python|grep ^i|wc -l

And check the installed packages' debsums with dpkg -l|grep python|awk '{print $2}'|while read p;do debsums $p;done

If you don't have debsums installed, install it with apt install debsums

This is a list of my installed python packages and versions https://gist.github.com/2bb594c5e2d6077c106ba0bae6426698

Check it against yours with dpkg -l|grep python|awk '{print $2," ", $3}'|column -t

You might try redirecting your output to a file to diff mine...
Image Image Image

pres b.
Level 1
Level 1
Posts: 19
Joined: Mon Jul 20, 2009 9:11 pm

Re: lsb_release - no modules / python3 dependency issues

Postby pres b. » Fri May 19, 2017 7:27 pm

WharfRat wrote:The problem with python is you need a working python to install python so it's sort of like the chicken/egg conundrum and about as easy to fix as putting toothpaste back in the tube.

First of all how many python packages are installed apt search python|grep ^i|wc -l

And check the installed packages' debsums with dpkg -l|grep python|awk '{print $2}'|while read p;do debsums $p;done

If you don't have debsums installed, install it with apt install debsums

This is a list of my installed python packages and versions https://gist.github.com/2bb594c5e2d6077c106ba0bae6426698

Check it against yours with dpkg -l|grep python|awk '{print $2," ", $3}'|column -t

You might try redirecting your output to a file to diff mine...


Thank you for this detailed response. It will be my project for the evening.

pres b.
Level 1
Level 1
Posts: 19
Joined: Mon Jul 20, 2009 9:11 pm

Re: lsb_release - no modules / python3 dependency issues

Postby pres b. » Fri May 19, 2017 7:53 pm

WharfRat wrote:The problem with python is you need a working python to install python so it's sort of like the chicken/egg conundrum and about as easy to fix as putting toothpaste back in the tube.

First of all how many python packages are installed apt search python|grep ^i|wc -l

And check the installed packages' debsums with dpkg -l|grep python|awk '{print $2}'|while read p;do debsums $p;done

If you don't have debsums installed, install it with apt install debsums

This is a list of my installed python packages and versions https://gist.github.com/2bb594c5e2d6077c106ba0bae6426698

Check it against yours with dpkg -l|grep python|awk '{print $2," ", $3}'|column -t

You might try redirecting your output to a file to diff mine...


Should I move forward with checking packages / versions if I got these fails after running debsums?

Code: Select all

/usr/bin/py3compile                                                       FAILED
/usr/share/python3/debpython/files.py                                     FAILED
/usr/share/python3/debpython/interpreter.py                               FAILED
/usr/bin/python3.5                                                        FAILED


The command line output was this:

Code: Select all

debsums: package idle-python3.5 is not installed
debsums: package python3 is not installed
debsums: package python3-distupgrade is not installed
debsums: package python3-update-manager is not installed

User avatar
WharfRat
Level 18
Level 18
Posts: 8686
Joined: Thu Apr 07, 2011 8:15 pm

Re: lsb_release - no modules / python3 dependency issues

Postby WharfRat » Fri May 19, 2017 8:31 pm

Lets see what these return

Code: Select all

for f in /usr/bin/py3compile /usr/share/python3/debpython/files.py /usr/share/python3/debpython/interpreter.py /usr/bin/python3.5; do ls -lh $f;done


Code: Select all

for f in /usr/bin/py3compile /usr/share/python3/debpython/files.py /usr/share/python3/debpython/interpreter.py /usr/bin/python3.5; do dpkg -S $f;done
Image Image Image

pres b.
Level 1
Level 1
Posts: 19
Joined: Mon Jul 20, 2009 9:11 pm

Re: lsb_release - no modules / python3 dependency issues

Postby pres b. » Fri May 19, 2017 8:44 pm

WharfRat wrote:Lets see what these return

Code: Select all

for f in /usr/bin/py3compile /usr/share/python3/debpython/files.py /usr/share/python3/debpython/interpreter.py /usr/bin/python3.5; do ls -lh $f;done


Code: Select all

for f in /usr/bin/py3compile /usr/share/python3/debpython/files.py /usr/share/python3/debpython/interpreter.py /usr/bin/python3.5; do dpkg -S $f;done


1st command:

Code: Select all

pres@brolic ~ $ for f in /usr/bin/py3compile /usr/share/python3/debpython/files.py /usr/share/python3/debpython/interpreter.py /usr/bin/python3.5; do ls -lh $f;done
-rwxr-xr-x 1 root root 12K May 17 16:28 /usr/bin/py3compile
-rw-r--r-- 1 root root 3.3K May 17 16:30 /usr/share/python3/debpython/files.py
-rw-r--r-- 1 root root 14K May 17 16:34 /usr/share/python3/debpython/interpreter.py
lrwxrwxrwx 1 root root 18 May  9 20:16 /usr/bin/python3.5 -> /usr/bin/python2.7


2nd command:

Code: Select all

pres@brolic ~ $ for f in /usr/bin/py3compile /usr/share/python3/debpython/files.py /usr/share/python3/debpython/interpreter.py /usr/bin/python3.5; do dpkg -S $f;done
python3-minimal: /usr/bin/py3compile
python3-minimal: /usr/share/python3/debpython/files.py
python3-minimal: /usr/share/python3/debpython/interpreter.py
python3.5-minimal: /usr/bin/python3.5

User avatar
WharfRat
Level 18
Level 18
Posts: 8686
Joined: Thu Apr 07, 2011 8:15 pm

Re: lsb_release - no modules / python3 dependency issues

Postby WharfRat » Fri May 19, 2017 9:37 pm

Well this doesn't look right lrwxrwxrwx 1 root root 18 May 9 20:16 /usr/bin/python3.5 -> /usr/bin/python2.7

What doeslh /usr/bin/python* return :?:
Image Image Image

pres b.
Level 1
Level 1
Posts: 19
Joined: Mon Jul 20, 2009 9:11 pm

Re: lsb_release - no modules / python3 dependency issues

Postby pres b. » Fri May 19, 2017 10:02 pm

WharfRat wrote:Well this doesn't look right lrwxrwxrwx 1 root root 18 May 9 20:16 /usr/bin/python3.5 -> /usr/bin/python2.7

What doeslh /usr/bin/python* return :?:


Yeah I noticed that, too. Immediately thought it had something to do with me trying to create a symbolic link so that Idle would use 3.5 instead of 2.7 (but I don't know if that's what the output means).

Had to modify the command because as it was written my terminal just kind of 'hung' and didn't display any output (didn't send output to a file, either). If this isn't what you were looking for, please let me know.

Code: Select all

pres@brolic /usr/bin $ ls -lh python*
lrwxrwxrwx 1 root root    9 Dec  1 14:39 python -> python2.7
lrwxrwxrwx 1 root root    9 Dec  1 14:39 python2 -> python2.7
-rwxr-xr-x 1 root root 3.4M Nov 19 04:35 python2.7
lrwxrwxrwx 1 root root    9 Dec  1 14:39 python3 -> python3.5
lrwxrwxrwx 1 root root   18 May  9 20:16 python3.5 -> /usr/bin/python2.7
-rwxr-xr-x 1 root root 4.3M Nov 17  2016 python3.5m
lrwxrwxrwx 1 root root   10 Dec  1 14:39 python3m -> python3.5m

User avatar
WharfRat
Level 18
Level 18
Posts: 8686
Joined: Thu Apr 07, 2011 8:15 pm

Re: lsb_release - no modules / python3 dependency issues

Postby WharfRat » Fri May 19, 2017 10:18 pm

Sorry, I sometimes forget that I have aliases setup for listings.

Try getting rid of the /usr/bin/python3.5 symlink with sudo rm /usr/bin/python3.5

Then try fixing python3.5 with sudo apt-get install --reinstall python3.5-minimal and see what happens.
Image Image Image

pres b.
Level 1
Level 1
Posts: 19
Joined: Mon Jul 20, 2009 9:11 pm

Re: lsb_release - no modules / python3 dependency issues

Postby pres b. » Fri May 19, 2017 10:22 pm

WharfRat wrote:Sorry, I sometimes forget that I have aliases setup for listings.

Try getting rid of the /usr/bin/python3.5 symlink with sudo rm /usr/bin/python3.5

Then try fixing python3.5 with sudo apt-get install --reinstall python3.5-minimal and see what happens.


This is what I got...

Code: Select all

pres@brolic ~ $ sudo rm /usr/bin/python3.5
[sudo] password for pres:
pres@brolic ~ $ sudo apt-get install --reinstall python3.5-minimal
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
7 not fully installed or removed.
Need to get 1,597 kB/1,606 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3.5-minimal amd64 3.5.2-2ubuntu0~16.04.1 [1,597 kB]
Fetched 1,597 kB in 9s (169 kB/s)                                                                                             
(Reading database ... 499659 files and directories currently installed.)
Preparing to unpack .../python3.5-minimal_3.5.2-2ubuntu0~16.04.1_amd64.deb ...
Unpacking python3.5-minimal (3.5.2-2ubuntu0~16.04.1) over (3.5.2-2ubuntu0~16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
dpkg: error processing package python3 (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
dpkg: dependency problems prevent configuration of python3-distupgrade:
 python3-distupgrade depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-distupgrade (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-update-manager:
 python3-update-manager depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.
 python3-update-manager depends on python3-distupgrade; however:
  Package python3-distupgrade is not configured yet.

dpkg: error processing package python3-update-manager (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-release-upgrader-core:
 ubuntu-release-upgrader-core depends on python3:any (>= 3.2~); however:
  Package python3 is not configured yet.
 ubuntu-release-upgrader-core depends on python3-distupgrade (= 1:16.04.21); however:
  Package python3-distupgrade is not configured yet.

dpkg: error processing package ubuntu-release-upgrader-core (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-manager-core:
 update-manager-core depends on python3:any (>= 3.2~); however:
  Package python3 is not configured yet.
 update-manager-core depends on python3-update-manager (= 1:16.04.6); however:
  Package python3-update-manager is not configured yet.
 update-manager-core depends on ubuntu-release-upgrader-core; however:
  Package ubuntu-release-upgrader-core is not configured yet.

dpkg: error processing package update-manager-core (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of unattended-upgrades:
 unattended-upgrades depends on python3; however:
  Package python3 is not configured yet.

dpkg: error processing package unattended-upgrades (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of lsb-core:
 lsb-core depends on python3; however:
  Package python3 is not configured yet.
 lsb-core depends on python3:any (>= 3.4~); however:
  Package python3 is not configured yet.

dpkg: error processing package lsb-core (--configure):
 dependency problems - leaving unconfigured
Setting up python3.5-minimal (3.5.2-2ubuntu0~16.04.1) ...
Errors were encountered while processing:
 python3
 python3-distupgrade
 python3-update-manager
 ubuntu-release-upgrader-core
 update-manager-core
 unattended-upgrades
 lsb-core
E: Sub-process /usr/bin/dpkg returned an error code (1)

User avatar
WharfRat
Level 18
Level 18
Posts: 8686
Joined: Thu Apr 07, 2011 8:15 pm

Re: lsb_release - no modules / python3 dependency issues

Postby WharfRat » Fri May 19, 2017 10:40 pm

It might be because there is no python3.5 so copy that file there manually

Code: Select all

mkdir ~/junk && cd ~/junk

Code: Select all

apt-get download python3.5-minimal

Code: Select all

dpkg-deb -X $(ls pyth*) .

Code: Select all

sudo cp -aiv usr/bin/python3.5 /usr/bin

Code: Select all

sudo dpkg-reconfigure python3.5-minimal
Image Image Image

pres b.
Level 1
Level 1
Posts: 19
Joined: Mon Jul 20, 2009 9:11 pm

Re: lsb_release - no modules / python3 dependency issues

Postby pres b. » Sat May 20, 2017 10:14 am

WharfRat wrote:It might be because there is no python3.5 so copy that file there manually

Code: Select all

mkdir ~/junk && cd ~/junk

Code: Select all

apt-get download python3.5-minimal

Code: Select all

dpkg-deb -X $(ls pyth*) .

Code: Select all

sudo cp -aiv usr/bin/python3.5 /usr/bin

Code: Select all

sudo dpkg-reconfigure python3.5-minimal


Thought I might have had a typo in the first 'cp' command (I used "/usr/" and your text shows "usr/") so I did it twice, with two different results. I just answered 'no' to the overwrite request because I wasn't sure what to do.

Code: Select all

[code]pres@brolic ~ $ mkdir ~/junk && cd ~/junk
pres@brolic ~/junk $ pwd
/home/pres_brolic/junk
pres@brolic ~/junk $ apt-get download python3.5-minimal
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3.5-minimal amd64 3.5.2-2ubuntu0~16.04.1 [1,597 kB]
Fetched 1,597 kB in 11s (135 kB/s)                                                                                     
pres@brolic ~/junk $ dpkg-deb -X $(ls pyth*) .
./
./usr/
./usr/bin/
./usr/bin/python3.5
./usr/bin/python3.5m
./usr/share/
./usr/share/doc/
./usr/share/doc/python3.5-minimal/
./usr/share/doc/python3.5-minimal/copyright
./usr/share/doc/python3.5-minimal/README.Debian
./usr/share/man/
./usr/share/man/man1/
./usr/share/man/man1/python3.5.1.gz
./usr/share/binfmts/
./usr/share/binfmts/python3.5
./usr/share/doc/python3.5-minimal/changelog.Debian.gz
./usr/share/man/man1/python3.5m.1.gz
pres@brolic ~/junk $ sudo cp -aiv /usr/bin/python3.5 /usr/bin
[sudo] password for pres:
cp: '/usr/bin/python3.5' and '/usr/bin/python3.5' are the same file
pres@brolic ~/junk $ sudo cp -aiv usr/bin/python3.5 /usr/bin
cp: overwrite '/usr/bin/python3.5'? n
[/code]

User avatar
WharfRat
Level 18
Level 18
Posts: 8686
Joined: Thu Apr 07, 2011 8:15 pm

Re: lsb_release - no modules / python3 dependency issues

Postby WharfRat » Sat May 20, 2017 10:30 am

In a prior post that file should have been deleted as it was a symlink to 2.7 unless the install of python3.5-minimal placed the file there.
pres@brolic ~ $ sudo rm /usr/bin/python3.5
[sudo] password for pres:
pres@brolic ~ $ sudo apt-get install --reinstall python3.5-minimal

You should copy and paste the code snippets to prevent mistakes.

What in /usr/bin now ls -lh /usr/bin/python*
Image Image Image

pres b.
Level 1
Level 1
Posts: 19
Joined: Mon Jul 20, 2009 9:11 pm

Re: lsb_release - no modules / python3 dependency issues

Postby pres b. » Sat May 20, 2017 10:42 am

WharfRat wrote:In a prior post that file should have been deleted as it was a symlink to 2.7 unless the install of python3.5-minimal placed the file there.
pres@brolic ~ $ sudo rm /usr/bin/python3.5
[sudo] password for pres:
pres@brolic ~ $ sudo apt-get install --reinstall python3.5-minimal

You should copy and paste the code snippets to prevent mistakes.

What in /usr/bin now ls -lh /usr/bin/python*


Code: Select all

pres@brolic ~/junk $ ls -lh /usr/bin/python*
lrwxrwxrwx 1 root root    9 Dec  1 14:39 /usr/bin/python -> python2.7
lrwxrwxrwx 1 root root    9 Dec  1 14:39 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 3.4M Nov 19 04:35 /usr/bin/python2.7
lrwxrwxrwx 1 root root    9 Dec  1 14:39 /usr/bin/python3 -> python3.5
-rwxr-xr-x 2 root root 4.3M Nov 17  2016 /usr/bin/python3.5
-rwxr-xr-x 2 root root 4.3M Nov 17  2016 /usr/bin/python3.5m
lrwxrwxrwx 1 root root   10 Dec  1 14:39 /usr/bin/python3m -> python3.5m

User avatar
WharfRat
Level 18
Level 18
Posts: 8686
Joined: Thu Apr 07, 2011 8:15 pm

Re: lsb_release - no modules / python3 dependency issues

Postby WharfRat » Sat May 20, 2017 10:59 am

You're showing errors with
Errors were encountered while processing:
python3
python3-distupgrade
python3-update-manager
ubuntu-release-upgrader-core
update-manager-core
unattended-upgrades
lsb-core


I don't have these packages installed
debsums: package python3-distupgrade is not installed
debsums: package python3-update-manager is not installed
debsums: package ubuntu-release-upgrader-core is not installed
debsums: package update-manager-core is not installed

Can you try purging those packages

Code: Select all

sudo apt-get purge python3-distupgrade python3-update-manager ubuntu-release-upgrader-core update-manager-core
Image Image Image

pres b.
Level 1
Level 1
Posts: 19
Joined: Mon Jul 20, 2009 9:11 pm

Re: lsb_release - no modules / python3 dependency issues

Postby pres b. » Sat May 20, 2017 11:50 am

WharfRat wrote:You're showing errors with
Errors were encountered while processing:
python3
python3-distupgrade
python3-update-manager
ubuntu-release-upgrader-core
update-manager-core
unattended-upgrades
lsb-core


I don't have these packages installed
debsums: package python3-distupgrade is not installed
debsums: package python3-update-manager is not installed
debsums: package ubuntu-release-upgrader-core is not installed
debsums: package update-manager-core is not installed

Can you try purging those packages

Code: Select all

sudo apt-get purge python3-distupgrade python3-update-manager ubuntu-release-upgrader-core update-manager-core


This is what was returned:

Code: Select all

pres@brolic ~/junk $ sudo apt-get purge python3-distupgrade python3-update-manager ubuntu-release-upgrader-core update-manager-core
[sudo] password for pres:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  python3-distupgrade* python3-update-manager* ubuntu-release-upgrader-core* update-manager-core*
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
7 not fully installed or removed.
Need to get 0 B/8,710 B of archives.
After this operation, 1,365 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 499657 files and directories currently installed.)
Removing update-manager-core (1:16.04.6) ...
Removing ubuntu-release-upgrader-core (1:16.04.21) ...
Purging configuration files for ubuntu-release-upgrader-core (1:16.04.21) ...
Removing python3-distupgrade (1:16.04.21) ...
Removing python3-update-manager (1:16.04.6) ...
Processing triggers for man-db (2.7.5-1) ...
dpkg: error processing package python3 (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
dpkg: dependency problems prevent configuration of unattended-upgrades:
 unattended-upgrades depends on python3; however:
  Package python3 is not configured yet.

dpkg: error processing package unattended-upgrades (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of lsb-core:
 lsb-core depends on python3; however:
  Package python3 is not configured yet.
 lsb-core depends on python3:any (>= 3.4~); however:
  Package python3 is not configured yet.

dpkg: error processing package lsb-core (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3
 unattended-upgrades
 lsb-core
E: Sub-process /usr/bin/dpkg returned an error code (1)


Also:

Code: Select all

pres@brolic ~/junk $ sudo dpkg -C
[sudo] password for pres:
The following packages are in a mess due to serious problems during
installation.  They must be reinstalled for them (and any packages
that depend on them) to function properly:
 python3              interactive high-level object-oriented language (default

The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
 unattended-upgrades  automatic installation of security upgrades

The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
 lsb-core             Linux Standard Base core support package


User avatar
WharfRat
Level 18
Level 18
Posts: 8686
Joined: Thu Apr 07, 2011 8:15 pm

Re: lsb_release - no modules / python3 dependency issues

Postby WharfRat » Sat May 20, 2017 12:12 pm

Well, the errors are diminishing a little

What does debsums -a python3 unattended-upgrades lsb-core show now.
Image Image Image

pres b.
Level 1
Level 1
Posts: 19
Joined: Mon Jul 20, 2009 9:11 pm

Re: lsb_release - no modules / python3 dependency issues

Postby pres b. » Sat May 20, 2017 12:14 pm

WharfRat wrote:Well, the errors are diminishing a little

What does debsums -a python3 unattended-upgrades lsb-core show now.


Code: Select all

pres@brolic ~/junk $ debsums -a python3 unattended-upgrades lsb-core
debsums: package python3 is not installed
debsums: package unattended-upgrades is not installed
debsums: package lsb-core is not installed


Return to “Newbie Questions”

Who is online

Users browsing this forum: No registered users and 4 guests