nuxctl installation error due to incorrect use of tag parameter
apooniajjn opened this issue · 2 comments
apooniajjn commented
Nuxctl Installation Error
I am trying to install nuxctl
on my local macOS machine using the steps given on this URL : https://nuxctl.nuagex.io/#download-for-os-x .
Given steps:
- Install
nuxctl
using below commands:
latestUrl=$(curl -s https://github.com/nuagenetworks/nuxctl/releases/latest | cut -d '"' -f 2); \
tag=$(echo "${latestUrl: -6}"); \
curl -L https://github.com/nuagenetworks/nuxctl/releases/download/${tag}/nuxctl-darwin-amd64 > /usr/local/bin/nuxctl && \
chmod a+x /usr/local/bin/nuxctl && \
/usr/local/bin/nuxctl version
- Command Output:
➜ ~ latestUrl=$(curl -s https://github.com/nuagenetworks/nuxctl/releases/latest | cut -d '"' -f 2); \
tag=$(echo "${latestUrl: -6}"); \
curl -L https://github.com/nuagenetworks/nuxctl/releases/download/$\{tag\}/nuxctl-darwin-amd64 > /usr/local/bin/nuxctl && \
chmod a+x /usr/local/bin/nuxctl && \
/usr/local/bin/nuxctl version
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9 0 9 0 0 28 0 --:--:-- --:--:-- --:--:-- 28
/usr/local/bin/nuxctl: line 1: Not: command not found
- As you can see it's adding
\
value in front oftag
parameter which fails to installnuxctl
on my local machine. Even though when i copy commands in my text editor I don't see it
Solution
Pass Variable as per below in double quotes instead of curly bracket.
Old value:
curl -L https://github.com/nuagenetworks/nuxctl/releases/download/${tag}/nuxctl-darwin-amd64 > /usr/local/bin/nuxctl && \
New Value:
curl -L https://github.com/nuagenetworks/nuxctl/releases/download/"$tag"/nuxctl-darwin-amd64 > /usr/local/bin/nuxctl && \
➜ ~ latestUrl=$(curl -s https://github.com/nuagenetworks/nuxctl/releases/latest | cut -d '"' -f 2); \
tag=$(echo "${latestUrl: -6}"); \
curl -L https://github.com/nuagenetworks/nuxctl/releases/download/"$tag"/nuxctl-darwin-amd64 > /usr/local/bin/nuxctl && \
chmod a+x /usr/local/bin/nuxctl && \
/usr/local/bin/nuxctl version
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 610 0 610 0 0 1814 0 --:--:-- --:--:-- --:--:-- 1810
100 10.2M 100 10.2M 0 0 5256k 0 0:00:01 0:00:01 --:--:-- 11.2M
0.6.0
➜ ~
hellt commented
Thanks Arun! Will fix it ASAP
чт, 24 янв. 2019 г., 23:30 Arun Poonia notifications@github.com:
… Nuxctl Installation Error
I am trying to install nuxctl on my local macOS machine using the steps
given on this URL : https://nuxctl.nuagex.io/#download-for-os-x .
Given steps:
1. Install nuxctl using below commands:
latestUrl=$(curl -s https://github.com/nuagenetworks/nuxctl/releases/latest | cut -d '"' -f 2); \
tag=$(echo "${latestUrl: -6}"); \
curl -L https://github.com/nuagenetworks/nuxctl/releases/download/${tag}/nuxctl-darwin-amd64 > /usr/local/bin/nuxctl && \
chmod a+x /usr/local/bin/nuxctl && \
/usr/local/bin/nuxctl version
1. Command Output:
➜ ~ latestUrl=$(curl -s https://github.com/nuagenetworks/nuxctl/releases/latest | cut -d '"' -f 2); \
tag=$(echo "${latestUrl: -6}"); \
curl -L https://github.com/nuagenetworks/nuxctl/releases/download/$\{tag\}/nuxctl-darwin-amd64 > /usr/local/bin/nuxctl && \
chmod a+x /usr/local/bin/nuxctl && \
/usr/local/bin/nuxctl version
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9 0 9 0 0 28 0 --:--:-- --:--:-- --:--:-- 28
/usr/local/bin/nuxctl: line 1: Not: command not found
1. As you can see it's adding \ value in front of tag parameter which
fails to install nuxctl on my local machine. Even though when i copy
commands in my text editor I don't see it
Solution
Pass Variable as per below in double quotes instead of curl bracket.
➜ ~ latestUrl=$(curl -s https://github.com/nuagenetworks/nuxctl/releases/latest | cut -d '"' -f 2); \
tag=$(echo "${latestUrl: -6}"); \
curl -L https://github.com/nuagenetworks/nuxctl/releases/download/"$tag"/nuxctl-darwin-amd64 > /usr/local/bin/nuxctl && \
chmod a+x /usr/local/bin/nuxctl && \
/usr/local/bin/nuxctl version
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 610 0 610 0 0 1814 0 --:--:-- --:--:-- --:--:-- 1810
100 10.2M 100 10.2M 0 0 5256k 0 0:00:01 0:00:01 --:--:-- 11.2M
0.6.0
➜ ~
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#18>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFaq9dphuY6XmgZglb_BmVBiehr8s5N6ks5vGhfagaJpZM4aRp77>
.
hellt commented
fixed with proposed edit