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

install.sh throws errors #715

Closed
mataneja opened this issue Aug 22, 2019 · 4 comments · Fixed by #716
Closed

install.sh throws errors #715

mataneja opened this issue Aug 22, 2019 · 4 comments · Fixed by #716
Labels
bug Something isn't working

Comments

@mataneja
Copy link

Thanks for the bug report!

Describe the bug

The shell PATH is unset because of the install script throwing errors while installing in a Ubuntu 16.04/18.04 LXD container env:

root@c16:~# curl https://get.wasmer.io -sSfL | sh
Installing Wasmer and WAPM!
sh: 258: [: verbose: unexpected operator

 > Getting wasmer releases... ✓
Downloading 0.6.0 release...
sh: 74: [: verbose: unexpected operator
Downloading 0.6.0 release... ✓tor
Unpacking contents... ✓
Adding to bash profile... ✓
sh: 170: [: verbose: unexpected operator
Successfully installed wasmer 0.6.0!
sh: 182: [: verbose: unexpected operator
root@c16:~# wasmer
bash: wasmer: command not found
root@c16:~# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
root@c16:~# echo "`wasmer -V` | `rustc -V` | `uname -m`"
bash: rustc: command not found
wasmer 0.6.0 |  | x86_64

Steps to reproduce

  1. Install LXD
  2. Launch a Ubuntu 16.04 or 18.04 container
  3. Install wasmer
  4. See error

Expected behavior

A clear install and the PATH variable setup appropriately so that I can start using wasmer/wapm immediately.

Actual behavior

The wasmer.sh script file is created:

root@c16:~# cat .wasmer/wasmer.sh 
# Wasmer config
export WASMER_DIR="/root/.wasmer"
export WASMER_CACHE_DIR="$WASMER_DIR/cache"
export PATH="$WASMER_DIR/bin:$WASMER_DIR/globals/wapm_packages/.bin:$PATH"

However, I need to explicitly source wasmer.sh in order to be able to use the appropriate cli cmds.

Additional context

N/A

@MarkMcCaskey
Copy link
Contributor

Thanks for the report! I wasn't able to reproduce this, but I think I found a fix. Let me know if you still have the issue after #716 ships!

@mataneja
Copy link
Author

root@c16:~# curl https://get.wasmer.io -sSfL | sh
Installing Wasmer and WAPM!

               ww            
               wwwww         
        ww     wwwwww  w     
        wwwww      wwwwwwwww 
ww      wwwwww  w     wwwwwww
wwwww      wwwwwwwwww   wwwww
wwwwww  w      wwwwwww  wwwww
wwwwwwwwwwwwww   wwwww  wwwww
wwwwwwwwwwwwwww  wwwww  wwwww
wwwwwwwwwwwwwww  wwwww  wwwww
wwwwwwwwwwwwwww  wwwww  wwwww
wwwwwwwwwwwwwww  wwwww   wwww
wwwwwwwwwwwwwww  wwwww       
   wwwwwwwwwwww   wwww       
       wwwwwwww              
           wwww              

> Getting wasmer releases... ✓
> Downloading 0.6.0 release...
> Downloading 0.6.0 release... ✓######################################## 100.0%
> Unpacking contents... ✓
> Adding to bash profile... ✓
\e[2mNote: We've added the following to your /root/.profile
If you have a different profile please add the following:

# Wasmer
export WASMER_DIR="/root/.wasmer"
[ -s "$WASMER_DIR/wasmer.sh" ] && source "$WASMER_DIR/wasmer.sh"

> Successfully installed wasmer 0.6.0!
\e[2mwasmer & wapm will be available the next time you open the terminal.
\e[2mIf you want to have the commands available now please execute:
source /root/.wasmer/wasmer.sh

That did the trick. I wonder if its better to source automatically as part of the install script so that the cmds are available immediately?

@syrusakbary
Copy link
Member

I wonder if its better to source automatically as part of the install script so that the cmds are available immediately?

Oh! Haven't thought of that, it's an interesting approach!

@xgqfrms
Copy link

xgqfrms commented Sep 10, 2022

env config problem

where is the default install path, and why not config it to the $PATH

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants