Command not found when trying to set up substrate - substrate

This is the first time I use the terminal on my mac OS. I have followed the instructions so far and restarted Terminal. I tried again making sure I followed every step. That is the reason it says it's already there. The next item I copied and pasted says command not found. Should I delete and start over?
-bash: rustup: command not found
Elizabeths-MacBook-Pro:~ el1748eth$ git clone -b v2.0.0 --depth 1 https://github.com/substrate-developer-hub/substrate-node-template
fatal: destination path 'substrate-node-template' already exists and is not an empty directory.
Elizabeths-MacBook-Pro:~ el1748eth$ cd substrate-node-template/
Elizabeths-MacBook-Pro:substrate-node-template el1748eth$ cargo build
-bash: cargo: command not found
Elizabeths-MacBook-Pro:substrate-node-template el1748eth$

Related

I want to clone a git rep. into my neovim config but it gives me a fatal

I want to run the following command:
git clone https://github.com/ChristianChiarulli/nvim.git ~/.config/nvim
Which gives me fatal: destination path '/Users/Me/.config/nvim' already exists and is not an empty directory
How can I fix this?
Your command aims to replace your ~/.config/nvim completely. So either delete your nvim config directory, or clone into another dir e.g. ~/.config/nvim/ and it will be cloned into ~/.config/nvim/nvim.

pkg ]add command never returns

New to julia. When I try to add a pkg via a julia prompt, the add command never returns to the command prompt in powershell. Same behavior in the default console in the windows julia install.
(v1.3) pkg> add Gadfly
Cloning default registries into `C:\Users\omort\.julia`
Cloning registry from "https://github.com/JuliaRegistries/General.git"
Fetching: [========================================>] 99.9 %
The gadfly install docs say to hit delete to return to the prompt, but that doesn't seem to work for me.
Seems to work ok in bash on Ubuntu. What am I missing?
Following David Varela's suggestion below:
(v1.3) pkg> registry update General
[ Info: registry `General` not found.
However - running a bare registry update did push the command forward, though it errored out:
(v1.3) pkg> add Gadfly
Cloning default registries into `C:\Users\omort\.julia`
Cloning registry from "https://github.com/JuliaRegistries/General.git"
ERROR: SystemError: opening file "C:\\Users\\omort\\.julia\\registries\\General\\Registry.toml": No such file or directory
Stacktrace:[...]
The ~/.julia directory exists, but that toml file does not.
Note: I was able to get this working effortlessly on a second Windows laptop this morning, so it's something specific to this install.

How do I get around "Filename too long" error when running `chef install` on Windows 10?

I'm transitioning from berkshelf to the Policyfile workflow, and everything was running fine until I attempted to resolve all the dependencies. Two of my dependencies are from git, so when I run chef install in the cookbook directory, I get the following error:
Error: Failed to generate Policyfile.lock
Reason: (CookbookOmnifetch::GitCommandError) Git error: command `git reset --hard 7e5e4bccf57718cacc246f1b4d501ff7de8ac13d` failed. If this error persists,
try removing the cache directory at 'C:/Users/pcummuskey/AppData/Local/chefdk/cache/.cache/git/780b7dbee933c3a9efbfd3898d54cdf72784fa7e'.Output from the command:
error: unable to create file test/kitchen/.kitchen/tmp/librarian/cache/source/chef/site/877777683730772c36b1e6a3fc3aa2c3/windows/version-uri/a3432e93fb3c21cb7111fde71e435661/package/files/default/handlers/windows_reboot_handler.rb: Filename too long
Checking out files: 100% (389/389), done.
fatal: Could not reset index file to revision '7e5e4bccf57718cacc246f1b4d501ff7de8ac13d'.
Predictably, removing the cache folder had zero effect on the problem. I'm in the middle of checking whether I can get it working in the ubuntu subsystem and/or docker atm, but it'd be nice to be able to run it natively on Windows.
I don't get this problem using "git bash" (MINGW64) packaged in Git for windows installer.
As an example:
$ pwd
/c/Users/foobar/AppData/Local/chefdk/cache/.cache/git/13036489648c6f8811262c6a50ff6b03da2395b7/4416ca3886d025b3ead519f1ee53af03ecb630f64416ca3886d025b3ead519f1ee53af03ecb630f64416ca3886d025b3ead519f1ee53af03ecb630f64416ca3886d025b3ead519f1ee53af03ecb630f6/4416ca3886d025b3ead519f1ee53af03ecb630f64416ca3886d025b3ead519f1ee53af03ecb630f64416ca3886d025b3ead519f1ee53af03ecb630f61
Managed to work around the issue by making a local cookbooks folder and checking out the dependencies to there and referencing them by path. It's not pretty, but it does the trick.

Trouble installing and running elasticsearch

Yes, I have thoroughly searched for another answer to this question but have yet to find one.
I tried installing first by following the instructions on this page: http://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html
I am not sure what to do after this step. It seems that is has installed correctly, but I don't know how to run it. (I am using PuTTY.) Can I import it into my module now and being using it, or is there something else I should do?
Here are some attempts I've made:
deloacha#azdev-deloacha:~$ bin/elasticsearch.bat
-bash: bin/elasticsearch.bat: No such file or directory
deloacha#azdev-deloacha:~$ cd elasticsearch-1.5.1/bin
-bash: cd: elasticsearch-1.5.1/bin: No such file or directory
deloacha#azdev-deloacha:~$ cd elasticsearch-1.5.1
-bash: cd: elasticsearch-1.5.1: No such file or directory
deloacha#azdev-deloacha:~$ cd ..
deloacha#azdev-deloacha:/home$ cd elasticsearch-1.5.1
-bash: cd: elasticsearch-1.5.1: No such file or directory
Installing the way as provided in the document can sometimes leads to confusion. You need to find the directory containing the elasticsearch files. most probably it'll be at "/etc/elast...."
Another easy way of installation follow the steps:
make a directory where you want to install
go to that directory and download elasticsearch there using
wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.5.1.tar.gz or curl
extract files: tar -zxvf elasticsearch-1.5.1.tar.gz
cd elasticsearch-1.5.1
You need to have java 7 on your system. you can start elasticsearch using "bin/elasticsearch -d" . "-d" is to run in detached mode.
Logs are by default in the location elasticsearch-1.5.1/logs. Check logs for any error during start up.
check status at: http://localhost:9200 or http://{system ip}:9200

p4 command not found

I'm trying to use p4 commands in my batch files on Mac like p4 login etc.
I keep getting the error "-bash p4: command not found".
I followed the top 7 steps here and got the same error:
http://www.endlesslycurious.com/2008/11/11/configuring-p4-command-line-client-on-mac-os-x/
I couldn't find anything else useful when searching.
Has anyone else encountered a similar issue and resolved it?
Just drop the "p4" executable in /usr/local/bin or even /usr/bin if you prefer. ;-)
How-To steps:
(1) Download p4 file for macOS from:
https://www.perforce.com/downloads/helix-command-line-client-p4
(2) Copy the item to any local folder under any custom folder. For ex: '/Users//perforce'
(3) Run the following commands in terminal.
chmod +x /Users/<yourname>/perforce/p4
export PATH=/Users/<yourname>/perforce:$PATH
(4) Now run 'p4' in terminal.
This should not fail!
To add to the existing answers, on my macOS Mojave, downloading Perforce 2019.1/1796703 for OSX 10.10+ using Safari gives me a p4.dms file.
You must rename it to p4 first before using it. Any attempt to unarchive the .dms file will fail. It is not a valid DMS archive.

Resources