How to fix the bash az-command not found - linux

I am trying to install Azure CLI on my raspberry pi 3 which runs Linux OS. I followed this guide, but it gives me this error: bash az-command not found. I search online and found no solution to this error.

To install Azure CLI, the simplest way is to follow the steps in the link provided. But it seems you use the second way. So you can't run the command apt install azure-cli directly. You need to prepare the dependencies for the Azure CLI. And you also need to make sure if your network is OK. In the end, I recommend you use the first way that runs the shell script.

I am facing the exact problem. i did "docker run -it mcr.microsoft.com/azure-cli" without the quotation marks

Related

Error when install Azure-Cli on my self hosted windows agent

I have Azure DevOps pipelines using my Windows Self-hosted agent on my intranet.
I want pipelines to create universal packages and I read that I must install an extension to Azure-Cli on the agent for this.
After several errors where system team helped me setup proxy and all, I run this command in elevated command prompt:
az extension add --name azure-devops
I have this error message:
Unable to get extension index.
Response body does not contain valid json. Error detail: Expecting value: line 1 column 1 (char 0)
What could be the issue ?
First of all, as Doris said, you need meet the most basic conditions for installing the azure-devops extension, that is, the version of az cli should be higher than 2.0.69. But as far as I know, this should not be the cause of issue you encountered.
azure cli along with extensions are all built with python. So you will find that "Error detail: Expecting value: line 1 column 1 (char 0)" is a normal JSONParseDecode error if you google it. It has many causes, like empty response, non-json response content, 500/503 error and etc. Without internet trace, I'm afraid it's hard to find the exact cause of it.
Work around:
========================================
To work around this issue so that you can use az devops command to achieve your goal, you can follow below steps:
1) Install the corresponding whl file into your local machine.
2) Retrieve the downloaded whl file location, then run this command from your command line(Here I would show you the sample script I used):
az extension add --source C:\Users\merlinl\Downloads\azure_devops-0.18.0-py2.py3-none-any.whl
3) Now you will see that the azure-devops installed successfully.
Check your CLI version.
You must have at least v2.0.69, which you can verify with az --version command. Refer to this.

Installation error while installing test corda node

i am trying to create a corda test node using the following link:
Corda Azure VM
I have followed the instruction as is and when i execute the command from "https://marketplace.r3.com/network" with their onetime script in the terminal sudo ONE_TIME_DOWNLOAD_KEY=91c51b4e-d619-4a20-90c1-24120687a74d bash -c "$(curl -L https://onboarder.prod.ws.r3.com/api/user/node/TESTNET/install.sh)"
I get the following error
any idea on how to solve this
I assume that you're talking about the last line (No such file or directory) since I don't see any errors really.
So the corda.service file allows you to start your Corda node when your VM starts, if it's missing; then you have to start the node manually.
I recommend that you follow the instructions in this link to create the file yourself (start at step number 8): https://docs.corda.net/deploying-a-node.html#linux-installing-and-running-corda-as-a-system-service
Please note that there are 2 approaches to create a service (SystemD and Upstart); so make sure that you follow the steps for only one approach (I used SystemD).

Error building a script for linux

I'm trying to build a script for linux to help me each time I install linux from scratch.
The Script have to 1.- Add repositories 2.- Install software from those repositories.
Adding repositories are not the problem, the problem is when i try to install software from this repo.
For the Repo:
sudo add-apt-repository -y ppa:webupd8team/java
After that, the script should make an update, so:
sudo apt-get update
It looks simple, but is not, because I receive an error:
The command Update could not be found.
And so on the rest of the softwares
apt-get -y install oracle-java8-installer
The package oracle-java8-installer couldn't be found..
I really don't know what should I do, nothing looks to work, I gave full rigths to the file and so on... always the same error.
But if I run the command apt-get install direct from the terminal, works without problem..
Any help?
actually I wrote a script in windows to use it in future Linux installations, for some reasons it doesn't work as I want it. Thinking it was a command or misspelled words, I search for a solution, wich didn't help anyways.
Debugging my script in a virtual Machine, I found that the script was giving some random errors like '/r' doesn't support and like that. Really weird because after searching in my script for that line code I didn't find it.
With that in mind, I search again for those errors, and found that for some reasons, if you write your code in a Windows maschine, it save it in a crlf type, wich in a Linux system is interpreted really wrong.
A solution of some users was converting the type from CRLF to LF, wich in linux is using the command dos2unix.
dos2unix filename.sh
After making that and runing my script again everything works perfectly.

node.js help for creating a silent doorbell

I'm not a coder (just wanted to get that out there). I read an article about creating a silent doorbell (I have a dog that's insane).
https://github.com/initialstate/silent-doorbell/wiki/Part-2.-Finding-the-Button's-Address
I'm relatively computer literate. I followed the instructions for windows and download node.js. The instructions say to open a node.js command prompt and put in the following command:
sudo apt-get install npm
sudo apt-get install libpcap-dev
npm install node-dash-button
the problem i'm having is 1) I'm getting an error saying "apt-get" is not recognized as an internal or external command operable program or batch file.
Reiterating that I am no nowhere near as sophisticated as the users i've seen on here and am just a guy trying to keep the baby sleeping b/c the dog can't shut up - is anyone able to help so I can then go to the next step of instructions?
Thanks so much in advance.
Brad
sudo apt-get is a linux packet manage, so you wouldn't want to do this on windows. As they have mentioned raspberry-pi's I gather that they have made the assumption that you would be on linux.
If you ran that command in a linux terminal it would install the preqequisites and then install node-dash-button in node.
Try just running the nodejs packet manager part:
npm install node-dash-button
The rest of that line is not node or windows.
Hopefully this will get you to the next stage :)
The whole tutorial asumes you being on a Linux/Unix system.
If you solve this issue you will run into the next if you don't know what the commands mean and how to translate them to windows.
For example
sudo node bin/findbutton
is a linux/unix command as well (which is the next step in your tutorial).
So i strongly suggest setting up a VM with linux (debian should do).

Running Azure node.js Tools on Ubuntu

I have followed these instructions.
And as far as I can tell I have successfully installed node.js azure tools. No error - nothing to suggest it failed.
However, I cannot, and the documentation says, simple run "azure"...
Maybe there is something I am missing with node.js?
There are a few problems you may be experiencing.
First of all, I would ensure you are running Node.js v0.6.20. You can do this by opening the command prompt and running:
node -v
You should have v0.6.20 echoed back.
If this doesn't work, you may be missing a path variable to Node.js or the NPM cache. Verify the Environment variables exist by running [in the command prompt]:
path
you should see two paths:
%appdata%\npm
[x64 Machine]
%programfiles(x86)%\nodejs\
[x86 Machine]
%programfiles%\nodejs\
If this doesn't work, I would check to ensure that the azure module was loaded into the %appdata%\npm\node_modules directory.
It could be the PATH issue. In my case, the azure program is located at ~/.npm-global/bin.
run "export PATH=$PATH:~/.npm-global/bin". Or just add to bash source file

Resources