Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails #254

Open
manfred0191 opened this issue Jun 13, 2023 · 13 comments
Open

Installation fails #254

manfred0191 opened this issue Jun 13, 2023 · 13 comments

Comments

@manfred0191
Copy link

Hello,

I wanted to run duf on my Ubuntu linux WSL2 system.

Installing it with

sudo apt install duf

failed with

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package duf

Then I tried the way with go build.

After running

cd duf
./duf

I got

mkoeller01@DESKTOP-MI8NFQP:~/duf$ ./duf
panic: runtime error: index out of range [11] with length 11

goroutine 1 [running]:
main.parseMountInfoLine({0xc0000f00c0?, 0x0?})
/home/mkoeller01/duf/mounts_linux.go:165 +0x299
main.mounts()
/home/mkoeller01/duf/mounts_linux.go:61 +0x17e
main.main()
/home/mkoeller01/duf/main.go:166 +0x1d3

Any idea how I can run that program simply to see if I like it?

@Creteil
Copy link

Creteil commented Sep 9, 2023

What is the version of your Ubuntu WFS2 ?

@manfred0191
Copy link
Author

It's Ubuntu 20.04

@Creteil
Copy link

Creteil commented Sep 9, 2023

In this case, you will have to fetch the latest version like that (inside a terminal) :

cd ~ && wget https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.deb && sudo dpkg -i ./duf_0.8.1_linux_amd64.deb

Hope it help...

bigbob@LAPTOP-AUTOMOTIVE:~$ cd ~ && wget https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.deb && sudo dpkg -i ./duf_0.8.1_linux_amd64.deb
--2023-09-09 10:24:47--  https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.deb
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/297165998/a2dd3a92-9b83-491e-ae7b-4c7de6e97c5b?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230909%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230909T082448Z&X-Amz-Expires=300&X-Amz-Signature=fbfbf70da8d6dec9e3986e8be0174bde37dd17009acae434740dd90661368751&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=297165998&response-content-disposition=attachment%3B%20filename%3Dduf_0.8.1_linux_amd64.deb&response-content-type=application%2Foctet-stream [following]
--2023-09-09 10:24:48--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/297165998/a2dd3a92-9b83-491e-ae7b-4c7de6e97c5b?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230909%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230909T082448Z&X-Amz-Expires=300&X-Amz-Signature=fbfbf70da8d6dec9e3986e8be0174bde37dd17009acae434740dd90661368751&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=297165998&response-content-disposition=attachment%3B%20filename%3Dduf_0.8.1_linux_amd64.deb&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.110.133, 185.199.109.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 917644 (896K) [application/octet-stream]
Saving to: �duf_0.8.1_linux_amd64.deb�

duf_0.8.1_linux_amd64.deb     100%[=================================================>] 896.14K  1011KB/s    in 0.9s

2023-09-09 10:24:49 (1011 KB/s) - �duf_0.8.1_linux_amd64.deb� saved [917644/917644]

Selecting previously unselected package duf.
(Reading database ... 45159 files and directories currently installed.)
Preparing to unpack ./duf_0.8.1_linux_amd64.deb ...
Unpacking duf (0.8.1) ...
Setting up duf (0.8.1) ...
bigbob@LAPTOP-AUTOMOTIVE:~$ duf
?----------------------------------------------------------------------------------------------------?
¦ 5 local devices                                                                                    ¦
+----------------------------------------------------------------------------------------------------¦
¦ MOUNTED ON          ¦   SIZE ¦   USED ¦  AVAIL ¦              USE%             ¦ TYPE ¦ FILESYSTEM ¦
+---------------------+--------+--------+--------+-------------------------------+------+------------¦
¦ /                   ¦ 251.0G ¦   1.9G ¦ 236.3G ¦ [....................]   0.8% ¦ ext4 ¦ /dev/sdb   ¦
¦ /init               ¦ 462.1G ¦ 385.0G ¦  77.1G ¦ [################....]  83.3% ¦ 9p   ¦ tools      ¦
¦ /mnt/c              ¦ 462.1G ¦ 385.0G ¦  77.1G ¦ [################....]  83.3% ¦ 9p   ¦ C:\        ¦
¦ /usr/lib/wsl/driver ¦ 462.1G ¦ 385.0G ¦  77.1G ¦ [################....]  83.3% ¦ 9p   ¦ drivers    ¦
¦ s                   ¦        ¦        ¦        ¦                               ¦      ¦            ¦
¦ /usr/lib/wsl/lib    ¦ 462.1G ¦ 385.0G ¦  77.1G ¦ [################....]  83.3% ¦ 9p   ¦ lib        ¦
?----------------------------------------------------------------------------------------------------?
?----------------------------------------------------------------------------------------------?
¦ 7 special devices                                                                            ¦
+----------------------------------------------------------------------------------------------¦
¦ MOUNTED ON     ¦ SIZE ¦ USED ¦ AVAIL ¦              USE%             ¦ TYPE     ¦ FILESYSTEM ¦
+----------------+------+------+-------+-------------------------------+----------+------------¦
¦ /dev           ¦ 3.1G ¦   0B ¦  3.1G ¦                               ¦ devtmpfs ¦ none       ¦
¦ /mnt/wsl       ¦ 3.1G ¦   0B ¦  3.1G ¦                               ¦ tmpfs    ¦ tmpfs      ¦
¦ /run           ¦ 3.1G ¦ 8.0K ¦  3.1G ¦ [....................]   0.0% ¦ tmpfs    ¦ none       ¦
¦ /run/lock      ¦ 3.1G ¦   0B ¦  3.1G ¦                               ¦ tmpfs    ¦ none       ¦
¦ /run/shm       ¦ 3.1G ¦   0B ¦  3.1G ¦                               ¦ tmpfs    ¦ none       ¦
¦ /run/user      ¦ 3.1G ¦   0B ¦  3.1G ¦                               ¦ tmpfs    ¦ none       ¦
¦ /sys/fs/cgroup ¦ 3.1G ¦   0B ¦  3.1G ¦                               ¦ tmpfs    ¦ tmpfs      ¦
?----------------------------------------------------------------------------------------------?
bigbob@LAPTOP-AUTOMOTIVE:~$

Follow new instructions to install the last version !!!

@l-33ter
Copy link

l-33ter commented Sep 21, 2023

Jup, I ran into the same mistake. Also, WSL - Debian 12.

 ./duf 
panic: runtime error: index out of range [11] with length 11

goroutine 1 [running]:
main.parseMountInfoLine({0xc0000c4000?, 0x0?})
        /home/mrcl/git/duf/mounts_linux.go:165 +0x279
main.mounts()
        /home/mrcl/git/duf/mounts_linux.go:61 +0x158
main.main()
        /home/mrcl/git/duf/main.go:166 +0x1c5

@l-33ter
Copy link

l-33ter commented Sep 21, 2023

sudo dpkg -i ./duf_0.8.1_linux_amd64.deb

again me..

(Reading database ... 51504 files and directories currently installed.)
Preparing to unpack ./duf_0.8.1_linux_amd64.deb ...
Unpacking duf (0.8.1) over (0.8.1) ...
Setting up duf (0.8.1) ...
mrcl@Debian:~/DL$ duf
panic: runtime error: index out of range [11] with length 11

goroutine 1 [running]:
main.parseMountInfoLine({0xc00016a000, 0x0})
        github.com/muesli/duf/mounts_linux.go:165 +0x299
main.mounts()
        github.com/muesli/duf/mounts_linux.go:61 +0x17e
main.main()
        github.com/muesli/duf/main.go:166 +0x1d1

I run more or less into the same error

@Creteil
Copy link

Creteil commented Sep 21, 2023

Can you post output of :

dpkg -l | grep golang | grep -v "\-dev"

@l-33ter
Copy link

l-33ter commented Sep 21, 2023

Nope, sorry.

dpkg -l | grep golang | grep -v "\-dev"
mrcl@Debian:~$ echo $?
1

@Creteil
Copy link

Creteil commented Sep 21, 2023

Please do :

sudo apt update && sudo apt dist-upgrade

Then recheck « duf »...

@l-33ter
Copy link

l-33ter commented Sep 21, 2023

I do not want to be arrogant, but this is the first command for me, if something is wrong :)
But for you I will do it :)

sudo apt update && sudo apt dist-upgrade -y
Hit:1 http://security.debian.org/debian-security bookworm-security InRelease
Hit:2 http://deb.debian.org/debian bookworm InRelease                         
Hit:3 http://ftp.debian.org/debian bookworm-backports InRelease               
Hit:4 https://packages.microsoft.com/repos/edge stable InRelease
Hit:5 http://deb.debian.org/debian bookworm-updates InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  libjq1 libonig5
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

@Creteil
Copy link

Creteil commented Sep 21, 2023

I just don't understand why it doesn't run properly at your side...

bigbob@LAPTOP-AUTOMOTIVE:~$ duf --version
duf 0.8.1 (3c55411)
bigbob@LAPTOP-AUTOMOTIVE:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal
bigbob@LAPTOP-AUTOMOTIVE:~$

@Creteil
Copy link

Creteil commented Sep 21, 2023

I have also Ubuntu 22.04 on same windows machine and it also work :

bigbob@LAPTOP-AUTOMOTIVE:~$ duf --version
duf 0.8.1 (3c55411)
bigbob@LAPTOP-AUTOMOTIVE:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy
bigbob@LAPTOP-AUTOMOTIVE:~$

@manfred0191
Copy link
Author

In this case, you will have to fetch the latest version like that (inside a terminal) :

cd ~ && wget https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.deb && sudo dpkg -i ./duf_0.8.1_linux_amd64.deb

Hope it help...

bigbob@LAPTOP-AUTOMOTIVE:~$ cd ~ && wget https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.deb && sudo dpkg -i ./duf_0.8.1_linux_amd64.deb
--2023-09-09 10:24:47--  https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.deb
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/297165998/a2dd3a92-9b83-491e-ae7b-4c7de6e97c5b?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230909%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230909T082448Z&X-Amz-Expires=300&X-Amz-Signature=fbfbf70da8d6dec9e3986e8be0174bde37dd17009acae434740dd90661368751&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=297165998&response-content-disposition=attachment%3B%20filename%3Dduf_0.8.1_linux_amd64.deb&response-content-type=application%2Foctet-stream [following]
--2023-09-09 10:24:48--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/297165998/a2dd3a92-9b83-491e-ae7b-4c7de6e97c5b?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230909%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230909T082448Z&X-Amz-Expires=300&X-Amz-Signature=fbfbf70da8d6dec9e3986e8be0174bde37dd17009acae434740dd90661368751&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=297165998&response-content-disposition=attachment%3B%20filename%3Dduf_0.8.1_linux_amd64.deb&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.110.133, 185.199.109.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 917644 (896K) [application/octet-stream]
Saving to: �duf_0.8.1_linux_amd64.deb�

duf_0.8.1_linux_amd64.deb     100%[=================================================>] 896.14K  1011KB/s    in 0.9s

2023-09-09 10:24:49 (1011 KB/s) - �duf_0.8.1_linux_amd64.deb� saved [917644/917644]

Selecting previously unselected package duf.
(Reading database ... 45159 files and directories currently installed.)
Preparing to unpack ./duf_0.8.1_linux_amd64.deb ...
Unpacking duf (0.8.1) ...
Setting up duf (0.8.1) ...
bigbob@LAPTOP-AUTOMOTIVE:~$ duf
?----------------------------------------------------------------------------------------------------?
¦ 5 local devices                                                                                    ¦
+----------------------------------------------------------------------------------------------------¦
¦ MOUNTED ON          ¦   SIZE ¦   USED ¦  AVAIL ¦              USE%             ¦ TYPE ¦ FILESYSTEM ¦
+---------------------+--------+--------+--------+-------------------------------+------+------------¦
¦ /                   ¦ 251.0G ¦   1.9G ¦ 236.3G ¦ [....................]   0.8% ¦ ext4 ¦ /dev/sdb   ¦
¦ /init               ¦ 462.1G ¦ 385.0G ¦  77.1G ¦ [################....]  83.3% ¦ 9p   ¦ tools      ¦
¦ /mnt/c              ¦ 462.1G ¦ 385.0G ¦  77.1G ¦ [################....]  83.3% ¦ 9p   ¦ C:\        ¦
¦ /usr/lib/wsl/driver ¦ 462.1G ¦ 385.0G ¦  77.1G ¦ [################....]  83.3% ¦ 9p   ¦ drivers    ¦
¦ s                   ¦        ¦        ¦        ¦                               ¦      ¦            ¦
¦ /usr/lib/wsl/lib    ¦ 462.1G ¦ 385.0G ¦  77.1G ¦ [################....]  83.3% ¦ 9p   ¦ lib        ¦
?----------------------------------------------------------------------------------------------------?
?----------------------------------------------------------------------------------------------?
¦ 7 special devices                                                                            ¦
+----------------------------------------------------------------------------------------------¦
¦ MOUNTED ON     ¦ SIZE ¦ USED ¦ AVAIL ¦              USE%             ¦ TYPE     ¦ FILESYSTEM ¦
+----------------+------+------+-------+-------------------------------+----------+------------¦
¦ /dev           ¦ 3.1G ¦   0B ¦  3.1G ¦                               ¦ devtmpfs ¦ none       ¦
¦ /mnt/wsl       ¦ 3.1G ¦   0B ¦  3.1G ¦                               ¦ tmpfs    ¦ tmpfs      ¦
¦ /run           ¦ 3.1G ¦ 8.0K ¦  3.1G ¦ [....................]   0.0% ¦ tmpfs    ¦ none       ¦
¦ /run/lock      ¦ 3.1G ¦   0B ¦  3.1G ¦                               ¦ tmpfs    ¦ none       ¦
¦ /run/shm       ¦ 3.1G ¦   0B ¦  3.1G ¦                               ¦ tmpfs    ¦ none       ¦
¦ /run/user      ¦ 3.1G ¦   0B ¦  3.1G ¦                               ¦ tmpfs    ¦ none       ¦
¦ /sys/fs/cgroup ¦ 3.1G ¦   0B ¦  3.1G ¦                               ¦ tmpfs    ¦ tmpfs      ¦
?----------------------------------------------------------------------------------------------?
bigbob@LAPTOP-AUTOMOTIVE:~$

Follow new instructions to install the last version !!!

Sorry for the late answer. This worked perfectly.

@qiuxiaomu
Copy link

The problem (probably not a problem) is, it seems it's not available in the distro's package manager by default, for Debian 12; it is there for Debian 11 though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants