Linux Lite Forums

Software - Support => Installing Software => Topic started by: Sprintrdriver on January 10, 2018, 05:03:08 PM

Title: First try to install a program by compile from a .tar.gz file
Post by: Sprintrdriver on January 10, 2018, 05:03:08 PM
Hi.

I'm hoping to be able to get qDirStat installed, but I'm stuck now and need help to get further.

This is what I have done so far
And I'm stuck because:
I'm reading the section "Compiling from the original source", but the README.md doesn't mention anything about compiling the source.

Title: Re: First try to install a program by compile from a .tar.gz file
Post by: Moltke on January 10, 2018, 05:13:33 PM
Hi @Sprintrdriver

Quote
I'm hoping to be able to get qDirStat installed, but I'm stuck now and need help to get further

Why  do you want to compile it when you can install it using "apt-get install qdirstat"? Just add the PPA:
Code: [Select]
sudo add-apt-repository ppa:nathan-renniewaldock/qdirstat
Code: [Select]
sudo apt-get update
Code: [Select]
sudo apt-get install qdirstat
https://launchpad.net/~nathan-renniewaldock/+archive/ubuntu/qdirstat

A way lot easier, isn't it?

Hope this helps! :)
Title: Re: First try to install a program by compile from a .tar.gz file
Post by: Sprintrdriver on January 10, 2018, 05:18:58 PM
Thanks a lot :)

Then I can try learning how to compile another day.

Btw - just before i Saw your post I found this web page: https://help.ubuntu.com/community/CompilingEasyHowTo
But under "Step 3: Resolving Dependencies" the article mention "the package apt-file" but fails to tell what it is - maybe a no-brainer for a more experienced Linux user, but for me that stops the whole progress.
Title: Re: First try to install a program by compile from a .tar.gz file
Post by: Moltke on January 10, 2018, 06:28:11 PM
Quote
Thanks a lot :)

You're welcome! :)

Quote
Then I can try learning how to compile another day...I'm reading the section "Compiling from the original source", but the README.md doesn't mention anything about compiling the source

I was curious so I downloaded it and in the readme file I found this:

Quote
#### Ubuntu

Install the required packages for building:

    sudo apt-get install build-essential qtbase5-dev zlib1g-dev

Dependent packages will be added automatically.

Recommended packages for developers:

sudo apt-get install qttools5-dev-tools qtbase5-doc qtbase5-doc-html qtbase5-examples

### Compiling

Open a shell window, go to the QDirStat source directory, then enter these
commands:

    qmake
    make


### Installing

    sudo make install

or

    su -c make install

However, it also states that 
Quote
Make sure you have a working Qt 5 build environment installed. This includes:

- C++ compiler (gcc recommended)
- Qt 5 runtime environment
- Qt 5 header files
- libz (compression lib) runtime and header file

I'm not expert nor I considered myself "a very experienced" user but following the instructions above I was able to install qdirstat quite very easy in just a couple of minutes, maybe you misread the readme file.

(http://i67.tinypic.com/28sc6k0.jpg)

EDIT: I was playing around with qdirstat since I have a usb hdd and from time to time I delete stuff to save some space, I was using "du" command which is very usefull and lately I installed "ncdu" which is a "cli gui" for du and works just fine. As I was checking the usb hdd with qdirstat I noticed that folder sizes are not correct, I confirmed this by opening "ncdu" which does shows the correct sizes and the difference is quite huge; for some folders qdirstat fails to show as much as almost  50% of the folder size, i.e 1 folder size is 165gb as shown in "ncdu" which is the correct size, on the other hand qdirstat shows only 85gb for the same folder. Also, qdirstat shows 428gb for total disk usage while ncdu shows 687gb which is correct. So, either something's missing in my system for qdirstat to work properly but then,  I didn't get any errors when installing it, or it simply doesn't work the way it should resulting in wrong results, so if you're looking for a tool to find and delete big files/directories, I suggest you give "ncdu" a try and see if it suits you, and if you happen to install it,  would you report back to confirm whether is one or the other this happens, please?

Cheers! :)
Title: Re: First try to install a program by compile from a .tar.gz file
Post by: Sprintrdriver on January 10, 2018, 07:36:18 PM
Yes, I must obviously misread it as I didn't see that earlier. Thanks again.
Title: Re: First try to install a program by compile from a .tar.gz file
Post by: Moltke on January 10, 2018, 08:31:02 PM
Yes, I must obviously misread it as I didn't see that earlier. Thanks again.

It happens. By the way, I just realized that qdirstat does show the correct sizes in the internal hdd; home, file system...So I guess it has something to do with the USB HDD only.