Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When the Ubuntu SDK preview was announced on the 2nd of January, it was based on the Qt 5 Beta release (as Qt 5 had not yet been released and packaged for Ubuntu). At some point, the Qt 5 release was packaged on a separate PPA and the Ubuntu SDK migrated to be based on the contents of that PPA.

New installs work fine as described on the Ubuntu SDK installation instructions, but I'd like to know how those of us who installed it on release day on the 2nd can migrate to the latest version of the SDK, as the change of PPAs requires a manual upgrade.

This seems to be related to reports of folks who get the "error importing Ubuntu.Components" message when upgrading the SDK.

share|improve this question
add comment

5 Answers 5

up vote 12 down vote accepted

During the migration from the Qt 5 Beta to the Qt 5 Release, the packaging changed significantly. This means upgrading the SDK is not a trivial task such as sudo apt-get upgrade, and a few manual steps are necessary.

Migration: from the Qt 5 Beta 1 to Qt 5.0

  1. Open the ~/.bashrc file

    $ gedit ~/.bashrc

  2. Remove the 'export PATH=/opt/qt5/bin:$PATH' line from the ~/.bashrc file

  3. Uninstall Qt Creator temporarily

    $ sudo apt-get remove qtcreator qt4-qmlviewer

  4. Purge the Qt 5 Beta 1 PPA

    $ sudo apt-get install ppa-purge

    $ sudo ppa-purge ppa:canonical-qt5-edgers/qt5-beta1

  5. Install the Ubuntu SDK preview

    $ sudo add-apt-repository ppa:ubuntu-sdk-team/ppa && sudo add-apt-repository ppa:canonical-qt5-edgers/qt5-proper && sudo apt-get update && sudo apt-get install ubuntu-sdk notepad-qml

  6. Test that the Component Showcase app can be executed:

    $ qmlscene /usr/lib/qt-components-ubuntu/demos/ComponentShowcase.qml

share|improve this answer
    
I followed the steps above and now I'm getting the following errors when executing the ComponentShowcase demo: ... module "Ubuntu.Components" is not installed ... module "QtQuick" is not installed ... –  Avedo Feb 14 '13 at 11:50
    
It seems that this was an bug that was fixed by the last update of the ppa:canonical-qt5-edgers/qt5-proper PPA. –  Avedo Feb 15 '13 at 22:20
    
I'm getting the same issue as Avedo, but it doesn't seem to be fixed by updating. :( –  sil Feb 16 '13 at 9:16
add comment

In case the step 4. does not remove all the packages from the qt5-beta1 PPA the line helped me to clean up was this:

$ grep ^Package: /var/lib/apt/lists/ppa.launchpad.net*sdk*Packages /var/lib/apt/lists/ppa.launchpad.net*qt5-beta1*Packages |awk '{print $2}'|xargs sudo apt-get -y remove

You can execute the same command and replace the "apt-get -y remove" to "sudo dpkg --purge" to purge the possible leftovers after apt-get.

share|improve this answer
add comment

@sil: sudo apt-get install qt-components-ubuntu will install the missing components.

Cheers,

share|improve this answer
add comment

In case you're unlucky (like me) to find after the Ubuntu SDK installation that:

  • it lacks the SQLITE Qt plugin (preventing the Notepad QML example from running)
  • it lacks the LocalStorage QML plugin (same effect as above)
  • Qt Creator installed with the SDK lacks Assistant help
  • your default (not installed in /opt or ~/) Qt4 dev environment is ruined (they warned you though, when you added the PPA)

You can get away by installing the Qt5.0.0 (not 5.0.1) via the (.run file) and then copying the contents of /usr/lib/i386-linux-gnu/qt5/qml/ to /home/your-name-here/Qt5.0.0/5.0.0/gcc/qml.

After that, you will be able to work with your Ubuntu projects (either launching from QML or via a C++ wrapper) from the Qt Creator bundled with Qt you installed from the run file (there will be no content-assistance for Ubuntu QML items, though).

I assume that setting paths (LD_LIBRARY_PATH et al) properly will allow the compiled apps to be run from the command-line, but haver not tried that, as the Qt5 installed with Ubuntu SDK is now always on my path, and I'm a Linux noob :)

If you know how one can get the contents of /usr/lib/i386-linux-gnu/qt5/qml/ without actually installing the components, please update this answer.

Hopefully, this is helpful to someone.

share|improve this answer
1  
The SDK Preview keeps improving at great paces, so if you find any issues, please do report them at bugs.launchpad.net/ubuntu-ui-toolkit/+filebug - the particular issue you're mentioning is a bug (bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1119730), which can be worked around by simply installing the missing packages manually (e.g. sudo apt-get install qtdeclarative5-localstorage-plugin) –  David Planella Feb 14 '13 at 17:35
    
And in general, I'd always recommend to install packaged versions of software, which will save you having to deal with things such as LD_LIBRARY_PATH (or even have to know what it means). And you get automatic updates of the software! :) –  David Planella Feb 14 '13 at 17:38
    
@DavidPlanella ok, many thanks for the hints. I'd still prefer to keep frameworks manually installed to separate dirs (may be there's a Slackware guy somewhere in me, who knows? :) –  mlvljr Feb 14 '13 at 17:45
2  
...and sudo apt-get install libqt5sql5-sqlite fixes the second issue, it appears. –  mlvljr Feb 14 '13 at 18:14
add comment

I had a problem with LocalStorage, but then I installed qtdeclarative5-localstorage-plugin as David Planella said. After that I got error that I don't have LocalStorage installed on line

import LocalStorage 2.0

and then I changed it to

import QtQuick.LocalStorage 2.0

and it works now.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.