89luca89 / distrobox

Use any linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. Mirror available at: https://gitlab.com/89luca89/distrobox
https://distrobox.it/
GNU General Public License v3.0
9.41k stars 384 forks source link

[Error] Distrobox on Fedora 40 fish shell is giving error when running distrobox enter #1416

Closed spignelon closed 2 weeks ago

spignelon commented 1 month ago

Describe the bug Upon installation of distrobox and and creating an arch container, when i run distrobox enter arch it throws an error and commands inside the arch container does not work.

To Reproduce Steps to reproduce the behavior:

$ distrobox-create --name arch --image archlinux:latest Creating 'arch' using image archlinux:latest [ OK ] Distrobox 'arch' successfully created. To enter, run:

$ distrobox enter arch

Installing basic packages...                     [ OK ]
Setting up devpts mounts...                      [ OK ]
Setting up read-only mounts...                   [ OK ]
Setting up read-write mounts...                  [ OK ]
Setting up host's sockets integration...         [ OK ]
Integrating host's themes, icons, fonts...       [ OK ]
Setting up package manager exceptions...         [ OK ]
Setting up package manager hooks...              [ OK ]
Setting up pacman exceptions...                  [ OK ]
Setting up pacman hooks...                       [ OK ]
Setting up distrobox profile...                  [ OK ]
Setting up sudo...                               [ OK ]
Setting up user groups...                        [ OK ]
Setting up kerberos integration...               [ OK ]
Setting up user's group list...                  [ OK ]
Setting up existing user...                      [ OK ]
Setting up user home...                          [ OK ]
Ensuring user's access...                        [ OK ]

Container Setup Complete!
fish: Unknown command: host-spawn
/etc/fish/conf.d/distrobox_config.fish (line 1): 
host-spawn sh -c "printf "%s" \$XAUTHLOCALHOSTNAME"
^~~~~~~~~^
in command substitution
        called on line 15 of file /etc/fish/conf.d/distrobox_config.fish
from sourcing file /etc/fish/conf.d/distrobox_config.fish
        called on line 248 of file /usr/share/fish/config.fish
from sourcing file /usr/share/fish/config.fish
        called during startup
/etc/fish/conf.d/distrobox_config.fish (line 15): Unknown command
                set -gx XAUTHLOCALHOSTNAME (host-spawn sh -c "printf "%s" \$XAUTHLOCALHOSTNAME")
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
from sourcing file /etc/fish/conf.d/distrobox_config.fish
        called on line 248 of file /usr/share/fish/config.fish
from sourcing file /usr/share/fish/config.fish
        called during startup
Linux fedora 6.8.10-300.fc40.x86_64 x86_64
 23:55:45 up 10:27,  0 user,  load average: 0.94, 1.14, 1.38

$ pacman -Syu
pacman: /usr/lib/libssl.so.3: version `OPENSSL_3.3.0' not found (required by /usr/lib/libcurl.so.4)

Expected behavior Normal functioning of distrobox enter arch command and normal functioning of pacman -Syu command

Logs Distrobox --verbose logs: https://pastebin.com/raw/67Sj6uat podman logs --latest output: podman_logs.txt

Desktop:

Additional context Using fish as my default shell

CakZemprongzz commented 1 month ago

Same issue as well for me in openSUSE Tumbleweed.

I have a temporary solution. According to arch wiki there is called pacman-static that should be possible to run without pacman and fix issue.

  1. Open this check the pinned comments and download the pre-compiled binaries
  2. Inside the Arch Linux distrobox type chmod +x pacman-static
  3. Do sudo ./pacman-static -Syu
  4. (Optional) Restart the distrobox
89luca89 commented 2 weeks ago

Fixed in commit cd4f580aa687955e591cc76df96f58390a8c8be9