Results 1 to 13 of 13

Thread: How to install Qt 4.7 from binary on Ubuntu 11.04

  1. #1
    Join Date
    Jan 2011
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question How to install Qt 4.7 from binary on Ubuntu 11.04

    Hello.

    I installed Qt 4.7 from binary before, using :

    Qt Code:
    1. chmod u+x qt-sdk-linux-x86-opensource-2010.05.1.bin
    2. ./qt-sdk-linux-x86-opensource-2010.05.1.bin
    To copy to clipboard, switch view to plain text mode 

    But when I tried to use qmake it said that qmake doesn't recognized or something like that.
    Also it doesn't appear in the application menu (I mean Qt tools).
    Anyways I removed it.

    I'm asking how to install Qt SDK from binary correctly on Ubuntu?
    Is there any way to make Ubuntu Software Center to install Qt from my downloaded binary? -> that because I've a slow Internet connection on th Linux machine, so I can't use internet to download it.

    Thanks in advance.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to install Qt 4.7 from binary on Ubuntu 11.04

    What you did was correct. The problem is the directory containing qmake is not in your system's PATH. You can modify your ~/.profile and add it or you can install Qt and QtCreator (separately) from your distro's package manager. Note the binary you downloaded is not compatible with Ubuntu's package management software.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    ibn-tashfin (10th January 2011)

  4. #3
    Join Date
    Jan 2011
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to install Qt 4.7 from binary on Ubuntu 11.04

    Thanks, I'll try to add it to my system path.

  5. #4
    Join Date
    Mar 2010
    Location
    Brazil
    Posts
    39
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to install Qt 4.7 from binary on Ubuntu 11.04

    I think better you install it from Synaptic.

  6. #5
    Join Date
    Jan 2011
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to install Qt 4.7 from binary on Ubuntu 11.04

    I added Qt to my system's path using this command:
    Qt Code:
    1. export PATH=$PATH:...
    To copy to clipboard, switch view to plain text mode 
    then qmake worked smoothly.

    But got one more issue, the make command yield this error:
    Qt Code:
    1. QApplication: no such file or directory
    To copy to clipboard, switch view to plain text mode 
    I guess that g++ can't locate Qt Libraries.. !

    well I found that thread in Ubuntu forums:
    http://ubuntuforums.org/archive/index.php/t-231764.html

    by asimon
    :
    ....
    You need to tell g++ where to find the include files. I.e. something like

    $ g++ -I/usr/include/qt4/include foo.cpp

    But this is not enough. You also need to tell it what libraries to link against, i.e. something like

    $ g++ -I/usr/include/qt4/include -L/usr/lib/include/qt4/lib -lQtGui -lQtCore -lpthread foo.cpp

    You should better use some automation here, like for example Qt's qmake. I.e. put your foo.cpp program in a directory called 'foo' and run 'qmake -project'. That will scann the current directory for source files and create a foo.pro project file. Then call 'qmake' which generates a Makefile from the .pro file. Then a simple 'make' will build you program 'foo' and if everything works as expected it should take care of all the needed compiler options.
    :
    ...
    So, is it really that g++ can't locate my Qt Libraries? If so, how to solve it?
    Or just I didn't add path correctly? If so, how to do it right ?

    ---------------------

    @HelderC:
    I think better you install it from Synaptic.
    Sure it's far better, but installing more than 300 mega bytes with a slow and unstable connection is a big issue for me.
    that because I've a slow Internet connection on th Linux machine, so I can't use internet to download it.

    Thanks all for replaying.
    Last edited by ibn-tashfin; 11th January 2011 at 20:08. Reason: spelling corrections

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to install Qt 4.7 from binary on Ubuntu 11.04

    Quote Originally Posted by ibn-tashfin View Post
    But got one more issue, the make command yield this error:
    Qt Code:
    1. QApplication: no such file or directory
    To copy to clipboard, switch view to plain text mode 
    I guess that g++ can't locate Qt Libraries.. !
    What's the project file and where are the header files installed?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #7
    Join Date
    Jan 2011
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to install Qt 4.7 from binary on Ubuntu 11.04

    Project file:
    helloWorld.pro
    Qt Code:
    1. TEMPLATE = app
    2. TARGET =
    3. DEPENDPATH += .
    4. INCLUDEPATH += .
    5.  
    6. # Input
    7. SOURCES += helloWorld.cpp
    To copy to clipboard, switch view to plain text mode 

    It's installed in the opt directory.

  9. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to install Qt 4.7 from binary on Ubuntu 11.04

    What does qmake -query return for QT_INSTALL_HEADERS? Better yet show us the whole output.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. The following user says thank you to wysota for this useful post:

    ibn-tashfin (11th January 2011)

  11. #9
    Join Date
    Jan 2011
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to install Qt 4.7 from binary on Ubuntu 11.04

    What does qmake -query return for QT_INSTALL_HEADERS? Better yet show us the whole output.
    Here what you asked:
    qmake -query output Code:
    1. QT_INSTALL_PREFIX:/usr
    2. QT_INSTALL_DATA:/usr/share/qt4
    3. QT_INSTALL_DOCS:/usr/share/qt4/doc
    4. QT_INSTALL_HEADERS:/usr/include/qt4
    5. QT_INSTALL_LIBS:/usr/lib
    6. QT_INSTALL_BINS:/usr/bin
    7. QT_INSTALL_PLUGINS:/usr/lib/qt4/plugins
    8. QT_INSTALL_IMPORTS:/usr/lib/qt4/imports
    9. QT_INSTALL_TRANSLATIONS:/usr/share/qt4/translations
    10. QT_INSTALL_CONFIGURATION:/etc/xdg
    11. QT_INSTALL_EXAMPLES:/usr/lib/qt4/examples
    12. QT_INSTALL_DEMOS:/usr/lib/qt4/demos
    13. QMAKE_MKSPECS:/usr/share/qt4/mkspecs
    14. QMAKE_VERSION:2.01a
    15. QT_VERSION:4.7.0
    To copy to clipboard, switch view to plain text mode 

    and thanks for help, I appreciate your effort with me

    [+]:
    I found that I have installed qmake package separately from Qt SDK, I think that makes problems.
    so I uninstalled Qt now, and uninstalled qmake too.
    do I have to remove the /usr qt's directories?

    I'll begin installing it again, but after your suggestions about where to install it.
    Last edited by ibn-tashfin; 11th January 2011 at 22:40. Reason: updated contents

  12. #10
    Join Date
    Jan 2011
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to install Qt 4.7 from binary on Ubuntu 11.04

    I'll begin installing it again, but after your suggestions about where to install it.
    I'm so exited so I couldn't wait
    anyways I installed it in the home directory. and added Qt's bin directory to the system paths, the same way before.

    and guess what, it works perfectly

    so the problem was from installing qmake separately, so that the system reads the second install of qmake which knows nothing about my Qt SDK installation.

    Well, I'm happy now, back to the world of Qt again

    Thanks for the help wysota.

  13. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to install Qt 4.7 from binary on Ubuntu 11.04

    This seems like qmake from your Ubuntu Qt installation and not the one you installed in /opt. How exactly did you modify your PATH?

    Edit: yeah... well.. too late Anyway, glad you made it work.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  14. #12
    Join Date
    Jan 2011
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to install Qt 4.7 from binary on Ubuntu 11.04

    yeah I'm glad too.
    Thanks again.

  15. #13
    Join Date
    Mar 2011
    Posts
    5
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Symbian S60

    Default Re: How to install Qt 4.7 from binary on Ubuntu 11.04

    I am completely new to qt can you guide me through installing qt

Similar Threads

  1. Replies: 5
    Last Post: 6th February 2011, 13:51
  2. how to install QT on Ubuntu?
    By waxwings in forum Installation and Deployment
    Replies: 2
    Last Post: 3rd July 2009, 11:34
  3. Replies: 0
    Last Post: 14th May 2009, 12:31
  4. "make install" doesn't install binary
    By jiveaxe in forum Newbie
    Replies: 2
    Last Post: 2nd January 2008, 13:00

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.