5

I'm trying to install Qt Creator to my Raspberry Pi 3 for a GUI project. However when I use the command

sudo apt-get install qt5-default

it gives an error saying that:

E:Unable to fetch some archives,maybe run apt-get update or try with --fix-missing?

As I considered the advice of my raspberry pi I tried the command sudo apt-get update. However I got errors again saying

Some index files failed to download. They have been ignored, or old ones used instead.

Apparently I am doing something wrong and any help will be appreciated.

Edit for clearance: Normally I was able to get updates without any errors. However after trying to install Qt it started giving errors as I tried to update.

2
  • So did you try with --fix-missing?
    – goldilocks
    Commented Jul 4, 2017 at 13:30
  • Yes, I just tried it and it gave no error. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. However, it still fails to update or install the qt.
    – Avio
    Commented Jul 4, 2017 at 14:09

2 Answers 2

2

Not particularly sure why you are trying to install that package, the App Note for installing Qt Creator on Raspberry Pi says to install

sudo apt-get install qt4-dev-tools

and

sudo apt-get install qtcreator

Some extra packages are also listed.

I personally keep Qt Creator on my PC which can compile programs a lot faster during development and then follow their Build Guide so I can compile it naively on a releasable version.

8
  • It gets stuck at first command. It gives the error "Unable to fetch some arhives, maybe run apt-get update or try with --fix-missing?"
    – Avio
    Commented Jul 5, 2017 at 6:20
  • And what happens when you run the two suggestions?
    – pfl
    Commented Jul 5, 2017 at 9:03
  • Update fails, and fix missing suggestion returns "0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. ". However I am still unable to install qt. I will try to reinstall Raspberian from scratch probably, I suspect this might be due to corrupted OS.I had no problems three days ago.
    – Avio
    Commented Jul 5, 2017 at 9:46
  • if sudo apt-get update is failing then it sounds like you have a bigger problem with your OS. When you say it fails what error message is displayed? And are you definitely connected to the internet? (try ping 8.8.8.8). If you have installed lots of packages already then I would try installing from a clean version of Rasbian on a separate SD card, if not just reformat your current SD card.
    – pfl
    Commented Jul 5, 2017 at 10:33
  • I reformatted my SD. Now, I have installed the Qt without any hardship or any problems. I don't know what was the problem but it is solved, I guess. Thanks for help. @pfl
    – Avio
    Commented Jul 5, 2017 at 10:58
5

Here is a working way to install Qt5. For Qt5 there is no need for dev-tools. So this command is not relevant:

sudo apt-get install qt4-dev-tools

The two commands needed to install Qt5 fully are:

  1. sudo apt-get install qt5-default (installs Qt version 5.7.1)
  2. sudo apt-get install qtcreator

Hope this helps.

3
  • Please contribute first so you get enough points and then comment, not the other way around!
    – MatsK
    Commented Oct 10, 2018 at 8:41
  • @Greenonline: Appreciate your edit & team spirit :) Cheers.
    – Chandra
    Commented Nov 11, 2018 at 12:04
  • Hi, it seems, nowadays there is no way to install qt5-default, it writes: "Package qt5-default is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source". Could you please help with it? I'm noob in question of Qt configuration, any help will be useful, googling provides too complicated answers to me Commented Dec 8, 2021 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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