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.
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
Open the
~/.bashrc
file$ gedit ~/.bashrc
Remove the
'export PATH=/opt/qt5/bin:$PATH'
line from the~/.bashrc
fileUninstall Qt Creator temporarily
$ sudo apt-get remove qtcreator qt4-qmlviewer
Purge the Qt 5 Beta 1 PPA
$ sudo apt-get install ppa-purge
$ sudo ppa-purge ppa:canonical-qt5-edgers/qt5-beta1
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
Test that the Component Showcase app can be executed:
$ qmlscene /usr/lib/qt-components-ubuntu/demos/ComponentShowcase.qml
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.
@sil:
sudo apt-get install qt-components-ubuntu
will install the missing components.Cheers,
In case you're unlucky (like me) to find after the Ubuntu SDK installation that:
/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.
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
and then I changed it to
and it works now.