Closed spothound closed 3 years ago
Okay, I've found that the problematic xonsh executable isn't actually a Xonsh appimage but a symbolic link to an executable:
total 25464
-rwxr-xr-x 1 vagrant vagrant 3801 Nov 14 15:50 entrypoint.sh
lrwxrwxrwx 1 vagrant vagrant 30 Nov 14 15:51 xonsh -> ./xonsh-squashfs/usr/bin/xonsh
-rw-r--r-- 1 vagrant vagrant 2039 Nov 14 15:50 xonshrc.xsh
-rwxr-xr-x 1 vagrant vagrant 26058792 Oct 16 23:16 xonsh-disabled
drwxr-xr-x 4 vagrant vagrant 4096 Nov 14 15:51 xonsh-squashfs
It seems that the appimage is being extracted in the entrypoint, here: https://github.com/xxh/xxh-shell-xonsh/blob/01dd29a3744edc0ea21aaa2aa7f6549b919a9634/entrypoint.sh#L118
And there is the python without math package. Now I need to understand why this Python (that seems to come from the appimage itself) doesn't have a required package.
Again, the downloaded appimage (which seems to be renamed to xonsh-disabled) works right:
vagrant@metasploitable3-ub1404:~/.xxh/.xxh/shells/xxh-shell-xonsh/build$ ./xonsh-disabled
Welcome to the xonsh shell (0.9.24.dev89)
~ This fix was trickier than expected ~
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
xonfig tutorial -> Launch the tutorial in the browser
xonfig web -> Run the configuration tool in the browser and claim your shell
(Note: Run the configuration tool or create a ~/.xonshrc file to suppress the welcome screen)
vagrant@metasploitable3-ub1404 ~/.xxh/.xxh/shells/xxh-shell-xonsh/build $
Hi @grg121! Thank you for reporting this!
The math
module should be in the package it's a good question why the exception raised.
I can't repeat this on xxh-dev:
mkdir ~/xxh && cd ~/xxh
git clone https://github.com/xxh/xxh-dev
cd xxh-dev
./xde clone -n xxh # clone xxh repo from https://github.com/xxh/xxh
./xde build # build docker containers
./xde up # run docker containers
./xde g start
# root@start:~#
xxh -i ~/id_rsa root@ubuntu_kf
# root@ubuntu_kf /root/.xxh #
import math
math
# <module 'math' from '/root/.xxh/.xxh/shells/xxh-shell-xonsh/build/xonsh-squashfs/opt/python3.8/lib/python3.8/lib-dynload/math.cpython-38-x86_64-linux-gnu.so'>
exit
exit
./xde stop
./xde remove
rm -rf ~/xxh
Before continue could you please run xxh vagrant@192.168.56.69 +s xonsh +iff
? The +iff
argument will completely remove .xxh
directory and install the xxh from scratch.
xonsh executable isn't actually a Xonsh appimage but a symbolic link to an executable
Right. The current version of xxh-shell-xonsh unpacking AppImage and create symlink to xonsh.
Hello @anki-code,
Thanks for your answer, that's weird. I did as you said a nothing changed. Then I tried removing the local xonsh shell:
rm -rf /home/grg121/.xxh/.xxh/shells/xxh-shell-xonsh
An tried again with success.
Maybe I broke something somehow on the local cloned xonsh shell... I'm not sure how. Sorry for the inconvenience, I guess this issue could be closed.
Ok, I'll close this. But I think we'll face with this in the future. Feel free to reopen.
Local OS (where xxh is installed): Arch linux Destination host OS: Ubuntu1404 xxh version: xxh/0.8.6 xxh-plugins installed: xxh-shell-xonsh
Steps to Reproduce
Hello there, I'm facing an issue with xxh which I could not understand. I'm trying to connect to different hosts running in virtual machines using vagrant. One with ubuntu14 and the other with centos7. While the second one works as expected, the ubuntu gives me the described problem.
I don't understand why python is complaining about
math
module, the Xonsh appimage is supposed to use his own Python3.8 with all the required modules, isn't it? Then, why it doesn't findmath
? Maybe I am not understanding something here.I've tried downloading the app image from Xonsh manually and it runs good, so I think there must be a problem with the build script or something, nevertheless I don't understand why Xonsh is trying to look for
math
package without sucess.What is more, if I run:
It seems that the default system python does have math module installed. So the problem must be with the one used by Xonsh.
I'm trying to find the cause and open this issue to write it down and in case someone could explain to me how is this Xonsh portable shell running and which Python is actually using.
Best regards.
For the community: ⬇️ Please click the 👍 reaction instead of leaving a
+1
or 👍 comment