I want to upgrade to Ubuntu 18.04 from 16.04. Neither “Software Updater” nor “sudo...












1















When I try sudo do-release-upgrade I get:



Traceback (most recent call last):
File "/usr/bin/do-release-upgrade", line 11, in <module>
from UpdateManager.Core.MetaRelease import MetaReleaseCore
File "/usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py", line 25, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
File "/usr/bin/do-release-upgrade", line 11, in <module>
from UpdateManager.Core.MetaRelease import MetaReleaseCore
File "/usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py", line 25, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'


What I've tried so far:



sudo apt update

sudo apt upgrade

sudo dist-upgrade

sudo apt autoremove

sudo do-release-upgrade

sudo update-manager

apt-get install -f

sudo apt install update-manager

sudo apt install ubuntu-release-upgrader-core

apt-get install python-apt

sudo apt remove python3-apt

sudo apt install python3-apt

sudo apt-get install python3-apt --reinstall

sudo rm -rf /var/lib/apt/lists/*


cd /usr/lib/python3/dist-packages

sudo cp apt_pkg.cpython-34m-i386-linux-gnu.so apt_pkg.so

sudo ln -s apt_pkg.cpython-{35m,34m}-x86_64-linux-gnu.so

sudo ln -s apt_pkg.cpython-{35m,34m}-x86_64-linux-gnu.so apt_pkg.so

/usr/bin/update-manager

sudo apt clean


When I tried:



sudo mv /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.bak


I got:



mv: cannot stat '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service': No such file or directory



Of course after doing all that, I again tried:



sudo apt update

sudo apt upgrade

sudo dist-upgrade

sudo apt autoremove

sudo do-release-upgrade


Still doesn't work.










share|improve this question



























    1















    When I try sudo do-release-upgrade I get:



    Traceback (most recent call last):
    File "/usr/bin/do-release-upgrade", line 11, in <module>
    from UpdateManager.Core.MetaRelease import MetaReleaseCore
    File "/usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py", line 25, in <module>
    import apt
    File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
    ModuleNotFoundError: No module named 'apt_pkg'
    Error in sys.excepthook:
    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
    File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
    File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
    File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
    File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
    import apt
    File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
    ModuleNotFoundError: No module named 'apt_pkg'

    Original exception was:
    Traceback (most recent call last):
    File "/usr/bin/do-release-upgrade", line 11, in <module>
    from UpdateManager.Core.MetaRelease import MetaReleaseCore
    File "/usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py", line 25, in <module>
    import apt
    File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
    ModuleNotFoundError: No module named 'apt_pkg'


    What I've tried so far:



    sudo apt update

    sudo apt upgrade

    sudo dist-upgrade

    sudo apt autoremove

    sudo do-release-upgrade

    sudo update-manager

    apt-get install -f

    sudo apt install update-manager

    sudo apt install ubuntu-release-upgrader-core

    apt-get install python-apt

    sudo apt remove python3-apt

    sudo apt install python3-apt

    sudo apt-get install python3-apt --reinstall

    sudo rm -rf /var/lib/apt/lists/*


    cd /usr/lib/python3/dist-packages

    sudo cp apt_pkg.cpython-34m-i386-linux-gnu.so apt_pkg.so

    sudo ln -s apt_pkg.cpython-{35m,34m}-x86_64-linux-gnu.so

    sudo ln -s apt_pkg.cpython-{35m,34m}-x86_64-linux-gnu.so apt_pkg.so

    /usr/bin/update-manager

    sudo apt clean


    When I tried:



    sudo mv /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.bak


    I got:



    mv: cannot stat '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service': No such file or directory



    Of course after doing all that, I again tried:



    sudo apt update

    sudo apt upgrade

    sudo dist-upgrade

    sudo apt autoremove

    sudo do-release-upgrade


    Still doesn't work.










    share|improve this question

























      1












      1








      1








      When I try sudo do-release-upgrade I get:



      Traceback (most recent call last):
      File "/usr/bin/do-release-upgrade", line 11, in <module>
      from UpdateManager.Core.MetaRelease import MetaReleaseCore
      File "/usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py", line 25, in <module>
      import apt
      File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
      import apt_pkg
      ModuleNotFoundError: No module named 'apt_pkg'
      Error in sys.excepthook:
      Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
      from apport.fileutils import likely_packaged, get_recent_crashes
      File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
      from apport.report import Report
      File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
      import apport.fileutils
      File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
      from apport.packaging_impl import impl as packaging
      File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
      import apt
      File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
      import apt_pkg
      ModuleNotFoundError: No module named 'apt_pkg'

      Original exception was:
      Traceback (most recent call last):
      File "/usr/bin/do-release-upgrade", line 11, in <module>
      from UpdateManager.Core.MetaRelease import MetaReleaseCore
      File "/usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py", line 25, in <module>
      import apt
      File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
      import apt_pkg
      ModuleNotFoundError: No module named 'apt_pkg'


      What I've tried so far:



      sudo apt update

      sudo apt upgrade

      sudo dist-upgrade

      sudo apt autoremove

      sudo do-release-upgrade

      sudo update-manager

      apt-get install -f

      sudo apt install update-manager

      sudo apt install ubuntu-release-upgrader-core

      apt-get install python-apt

      sudo apt remove python3-apt

      sudo apt install python3-apt

      sudo apt-get install python3-apt --reinstall

      sudo rm -rf /var/lib/apt/lists/*


      cd /usr/lib/python3/dist-packages

      sudo cp apt_pkg.cpython-34m-i386-linux-gnu.so apt_pkg.so

      sudo ln -s apt_pkg.cpython-{35m,34m}-x86_64-linux-gnu.so

      sudo ln -s apt_pkg.cpython-{35m,34m}-x86_64-linux-gnu.so apt_pkg.so

      /usr/bin/update-manager

      sudo apt clean


      When I tried:



      sudo mv /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.bak


      I got:



      mv: cannot stat '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service': No such file or directory



      Of course after doing all that, I again tried:



      sudo apt update

      sudo apt upgrade

      sudo dist-upgrade

      sudo apt autoremove

      sudo do-release-upgrade


      Still doesn't work.










      share|improve this question














      When I try sudo do-release-upgrade I get:



      Traceback (most recent call last):
      File "/usr/bin/do-release-upgrade", line 11, in <module>
      from UpdateManager.Core.MetaRelease import MetaReleaseCore
      File "/usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py", line 25, in <module>
      import apt
      File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
      import apt_pkg
      ModuleNotFoundError: No module named 'apt_pkg'
      Error in sys.excepthook:
      Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
      from apport.fileutils import likely_packaged, get_recent_crashes
      File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
      from apport.report import Report
      File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
      import apport.fileutils
      File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
      from apport.packaging_impl import impl as packaging
      File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
      import apt
      File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
      import apt_pkg
      ModuleNotFoundError: No module named 'apt_pkg'

      Original exception was:
      Traceback (most recent call last):
      File "/usr/bin/do-release-upgrade", line 11, in <module>
      from UpdateManager.Core.MetaRelease import MetaReleaseCore
      File "/usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py", line 25, in <module>
      import apt
      File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
      import apt_pkg
      ModuleNotFoundError: No module named 'apt_pkg'


      What I've tried so far:



      sudo apt update

      sudo apt upgrade

      sudo dist-upgrade

      sudo apt autoremove

      sudo do-release-upgrade

      sudo update-manager

      apt-get install -f

      sudo apt install update-manager

      sudo apt install ubuntu-release-upgrader-core

      apt-get install python-apt

      sudo apt remove python3-apt

      sudo apt install python3-apt

      sudo apt-get install python3-apt --reinstall

      sudo rm -rf /var/lib/apt/lists/*


      cd /usr/lib/python3/dist-packages

      sudo cp apt_pkg.cpython-34m-i386-linux-gnu.so apt_pkg.so

      sudo ln -s apt_pkg.cpython-{35m,34m}-x86_64-linux-gnu.so

      sudo ln -s apt_pkg.cpython-{35m,34m}-x86_64-linux-gnu.so apt_pkg.so

      /usr/bin/update-manager

      sudo apt clean


      When I tried:



      sudo mv /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.bak


      I got:



      mv: cannot stat '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service': No such file or directory



      Of course after doing all that, I again tried:



      sudo apt update

      sudo apt upgrade

      sudo dist-upgrade

      sudo apt autoremove

      sudo do-release-upgrade


      Still doesn't work.







      ubuntu






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 10 at 17:40









      FarmerobotFarmerobot

      61




      61






















          1 Answer
          1






          active

          oldest

          votes


















          1














          If you've tried the step-by-step directions from FOSS and it fails, then the alternative is to download the Ubuntu 18.04 ISO and do a clean installation. This has the advantage of removing old Unity packages and settings, since 18.04 uses GNOME.



          Of course, this loses all customization and data, so save your data, and also make a disk image, should something go wrong. Having done both upgrades of 16.04 and complete new installations, I find the second choice is faster and easier, despite the disadvantage of requiring data and additional package reinstallation.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1392866%2fi-want-to-upgrade-to-ubuntu-18-04-from-16-04-neither-software-updater-nor-su%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            If you've tried the step-by-step directions from FOSS and it fails, then the alternative is to download the Ubuntu 18.04 ISO and do a clean installation. This has the advantage of removing old Unity packages and settings, since 18.04 uses GNOME.



            Of course, this loses all customization and data, so save your data, and also make a disk image, should something go wrong. Having done both upgrades of 16.04 and complete new installations, I find the second choice is faster and easier, despite the disadvantage of requiring data and additional package reinstallation.






            share|improve this answer




























              1














              If you've tried the step-by-step directions from FOSS and it fails, then the alternative is to download the Ubuntu 18.04 ISO and do a clean installation. This has the advantage of removing old Unity packages and settings, since 18.04 uses GNOME.



              Of course, this loses all customization and data, so save your data, and also make a disk image, should something go wrong. Having done both upgrades of 16.04 and complete new installations, I find the second choice is faster and easier, despite the disadvantage of requiring data and additional package reinstallation.






              share|improve this answer


























                1












                1








                1







                If you've tried the step-by-step directions from FOSS and it fails, then the alternative is to download the Ubuntu 18.04 ISO and do a clean installation. This has the advantage of removing old Unity packages and settings, since 18.04 uses GNOME.



                Of course, this loses all customization and data, so save your data, and also make a disk image, should something go wrong. Having done both upgrades of 16.04 and complete new installations, I find the second choice is faster and easier, despite the disadvantage of requiring data and additional package reinstallation.






                share|improve this answer













                If you've tried the step-by-step directions from FOSS and it fails, then the alternative is to download the Ubuntu 18.04 ISO and do a clean installation. This has the advantage of removing old Unity packages and settings, since 18.04 uses GNOME.



                Of course, this loses all customization and data, so save your data, and also make a disk image, should something go wrong. Having done both upgrades of 16.04 and complete new installations, I find the second choice is faster and easier, despite the disadvantage of requiring data and additional package reinstallation.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 10 at 17:55









                DrMoishe PippikDrMoishe Pippik

                10.2k21432




                10.2k21432






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1392866%2fi-want-to-upgrade-to-ubuntu-18-04-from-16-04-neither-software-updater-nor-su%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                    Alcedinidae

                    Origin of the phrase “under your belt”?