QT installation problem + where is program folder in ubuntu?

Asked by Hal

I've got a couple of simple newbie question:

1. I'm trying to install QT4 on Ubuntu LLinx and I've read that the best place to install soft is /usr/local/ directory
so when installing QT4 when I get to the box where you specify the directory I specify as following
/usr/local/qtsdk-2010.04
I press Next it comes up with an error:
The directory /usr/local
is not writable by the current user
Q: sorry I'm trying to learn the linux ropes here:
- Why is it not writable ?
- How to make it writable ?

2. Q
- Where is the program folder for all programs installed from Synaptic Package Manager ?
- Where ( what directory ) should I install programs that install from web download ( not from Synaptic Package Manager )?
I've looked at directory structure and could not find any consistent answer ...

Please, help out.
Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu qt-sdk Edit question
Assignee:
No assignee Edit question
Solved by:
Hal
Solved:
Last query:
Last reply:
Revision history for this message
Nitesh Mistry (mistrynitesh) said :
#1

A1.
Do you have a specific reason to install this package manually?

If not, you can install the program from Synaptic Package Manager (search for qt-sdk) or from command line do:
sudo apt-get install qt-sdk

In a linux directory structure, every user has write access only to his/her own home folder located at /home/(user). All the other files and directories outside /home is writable only by 'root'. That is why you are getting this error.

If you want to install this software only for your use, you can specify a directory under your home folder, e.g., '/home/(your-username)/bin'

A2.
In linux, various programs are installed at various places depending on what the program is, and who/how it is installed. All the core programs are installed in '/bin' directory. Various other user level programs are installed at various other places lke '/usr/bin' , '/usr/local/bin' , '/usr/sbin' etc. For learning more on linux file system layout and other linux basics, you may want to read http://tldp.org/LDP/intro-linux/html/sect_03_01.html#sect_03_01_03

Revision history for this message
Hal (hallansing) said :
#2

Thank you Nitesh,
Ok, still have questions:

- I thought and general info from the web is that home dir in linux is similar to my documents dir in windows
and it's not for program installations, is that right ? because if I look under /home/myname I don't see any
programs installed there, not by me, not by synaptic, just documents, then why would I want to install QT4 there ?

- to continue... from info gather on the web, not-off-synaptic-pac-manager-programs should be installed in
/usr/local directory vs the home directory, that the proper way, is that right and what's the diff?

it's confusing me...

I decided to install qt by downloading from there website because a. I was confused about all qt packages in synaptic
as there is no clear tree structure there ( like main QT and then the rest of packages under QT tree, instead every qt package is just thrown in the synaptic separately ), same for other programs.

Revision history for this message
Nitesh Mistry (mistrynitesh) said :
#3

"- I thought and general info from the web is that home dir in linux is similar to my documents dir in windows
and it's not for program installations, is that right ? because if I look under /home/myname I don't see any
programs installed there, not by me, not by synaptic, just documents, then why would I want to install QT4 there ?"

Your home dir is YOUR HOME and you can do whatever you want there without disturbing the system-wide configuration. Though most people use their home dir generally for saving documents, pictures, videos etc., many also use it to install their "custom" software like some scripts or some experimental software, so that if it breaks, it breaks only their home dir and not the entire system.

"- to continue... from info gather on the web, not-off-synaptic-pac-manager-programs should be installed in
/usr/local directory vs the home directory, that the proper way, is that right and what's the diff?"

Whatever is installed in /usr/local dir is available to all the users of the system. It also means having root access to the system to install the software there (that is using 'sudo'). The side effect is, if it breaks, all the users of the system will be affected.

"I decided to install qt by downloading from there website because a. I was confused about all qt packages in synaptic
as there is no clear tree structure there ( like main QT and then the rest of packages under QT tree, instead every qt package is just thrown in the synaptic separately ), same for other programs."

In Synaptic, when you select any package by clicking on its name, you get a description of the package in the bottom pane. The description of the packages there is almost as good as you find it on the webpage of that package. Linux program are designed and developed to be as modular as possible so that they can share the common code with other programs. Thus when you want to install qt, you would find that package qt-sdk also uses other libraries like 'libqt4-dev' , 'qt4-doc' etc etc (also known as dependencies) so that if other program needs to use the same code, they can just link to the installed library instead of installing the library again. That is the reason why you see so many different packages named 'qt***'. But generally the package that you need to install would have the same name as you would find it on the web, for example, in your case, 'qt-sdk'. When you click on this name in Synaptic, in the description pane below, you might be able to read this:
This meta-package provides a complete Qt Software Development Kit. Tools cover IDE, revision control, debugging and documentation.
So you know this is the package to install.

Hope this helps.

Revision history for this message
Hal (hallansing) said :
#4

Nitesh, thank you very much for good explanations.
Details like this are harder to factor, so thanks !!!

I got qt installed from synaptic.
Problem solved.

Revision history for this message
Nitesh Mistry (mistrynitesh) said :
#5

You are most welcome.
Good to have you in the community.