Redocly CLI command not found - zsh

I am trying to use Redocly CLI to split an OpenAPI definition file.
It was working last night but doesn't work this morning.
When I try to run a redocly command, for example:
redocly lint openapi.yaml
the output I get is:
zsh: command not found: redocly
Redocly CLI is installed globally.
I tried to install it again.
This is the command I used as shown in the Redocly documentation:
npm install #redocly/cli -g
And the output in the terminal is:
changed 256 packages, and audited 257 packages in 10s
31 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Any assistance would be helpful.

Related

installation lemon Could NOT find ILOG COIN SOPLEX

I am trying to install a github repository and on running as follows
/home/user/.local/bin/python3 -m pip install -e /home/user/repository_folder_name
I get the following error
ERROR: Command errored out with exit status 1:
command: /home/user/.local/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/user/PyMatching/setup.py'"'"'; __file__='"'"'/home/user/PyMatching/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
cwd: /home/user/PyMatching/
Complete output (54 lines):
running develop
running egg_info
writing src/PyMatching.egg-info/PKG-INFO
writing dependency_links to src/PyMatching.egg-info/dependency_links.txt
writing requirements to src/PyMatching.egg-info/requires.txt
writing top-level names to src/PyMatching.egg-info/top_level.txt
reading manifest file 'src/PyMatching.egg-info/SOURCES.txt'
writing manifest file 'src/PyMatching.egg-info/SOURCES.txt'
running build_ext
-- pybind11 v2.4.dev4
CMake Warning (dev) at lib/lemon/CMakeLists.txt:6 (PROJECT):
Policy CMP0048 is not set: project() command manages VERSION variables.
Run "cmake --help-policy CMP0048" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
The following variable(s) would be set to empty:
LEMON_VERSION
This warning is for project developers. Use -Wno-dev to suppress it.
-- Could NOT find ILOG (missing: ILOG_CPLEX_LIBRARY ILOG_CPLEX_INCLUDE_DIR)
-- Could NOT find COIN (missing: COIN_CBC_LIBRARY COIN_CBC_SOLVER_LIBRARY COIN_CGL_LIBRARY COIN_CLP_LIBRARY COIN_OSI_LIBRARY COIN_OSI_CBC_LIBRARY COIN_OSI_CLP_LIBRARY)
-- Could NOT find SOPLEX (missing: SOPLEX_LIBRARY SOPLEX_INCLUDE_DIR)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/PyMatching
Error: could not load cache
There is a similar question here. But I have tried commenting out #CMAKE_POLICY(SET CMP0048 OLD)
and made sure that I am using the latest version of cmake.
I have no idea how to find these development libraries or find alternatives. Please suggest how to resolve this. Also, this is an issue only on the unix server where I am trying to run this. On my local Windows computer, installation went smoothly.
I'm the developer of PyMatching and I've now added it to the Python package index (see here) so you can install the latest version from PyPI with pip:
pip install pymatching
Since pip will fetch the wheels, which have been built for various platforms, this should hopefully fix your issue, as you won't need to build it yourself.
If you still need to build your own local copy of the PyMatching source code for some reason, just cloning the latest version of the repo might also solve your problem, as I've switched to a more recent version of the Lemon C++ library since you posted.
If this doesn't fix the problem, you could also create an issue on GitHub and/or let me know which version of your operating system you're using.

Logstash command not found

After installation I make config file in /etc/logstash/logstash.conf and try to run logstash command.
When I run following command
root#ip:~# logstash --version
always showing error:
showing command not found.
In this case do following thing:
Search the location of logstash using following command
root#whereis:~# whereis logstash
output:
logstash: /etc/logstash /usr/share/logstash
then goto
root#whereis:~# cd /usr/share/logstash
root#ip:/usr/share/logstash# cd bin
root#ip:/usr/share/logstash/bin#
Run command from here like:
root#ip:/usr/share/logstash/bin# logstash --version
If you still not able to run and getting error command not found then the current directory isn't listed in your path. If you want to run a program in the current directory you can use like ./program_name:
root#ip:~# ./logstash --version

Virtuoso appears to be installed... but isn't (and won't run)

I've followed the instructions to install the stable branch of Virtuoso Open Source 7 on Ubuntu 16.04. There don't appear to be any errors throughout the process of —
./autogen.sh
CFLAGS="-O2 -m64"
export CFLAGS
./configure
make
make install
However, when I go to /usr/local/virtuoso-opensource/var/lib/virtuoso/db (which contains only virtuoso.ini) and run —
virtuoso-t -f &
The first time I do this the terminal just vanishes. When I reopen the terminal and run the same again it just reads The program 'virtuoso-t' is currently not installed. You can install it by typing: apt install virtuoso-opensource-6.1-bin.
I've tried installing both 7 stable and develop from github and both produce the same result. I'd rather use 7 but tried installing 6 via the ubuntu package and conductor wouldn't work for me - not having much luck all round, one of those days.
Thanks for assistance you can provide.
Sounds like you didn't adjust your $PATH variable after make install.
$PATH should include the path to the directory which contains the virtuoso-t, or you can include that path in the launch command, e.g. —
/path/to/virtuoso-t -f -c /usr/local/virtuoso-opensource/var/lib/virtuoso/db/virtuoso.ini &
(Note that the develop/7 branch is recommended over stable/7 at the moment, due to the number of fixes there.)

How to add firebase to my bash profile? [duplicate]

This question already has answers here:
firebase-tools "-bash: firebase: command not found"
(32 answers)
Closed 6 years ago.
I have been having trouble installing firebase command line tools. I am following the guide at: https://www.firebase.com/docs/hosting/command-line-tool.html. I have run the initial command into my terminal: npm install -g firebase-tools. Once I run: firebase init in the root of my directory, I get the following error:
-bash: firebase: command not found
I have looked at guides how to manually modify my bash profile, but can not figure out how to do so... Shouldn't my bash .bash_profile automatically get modified when I run a global command?? Any help would be appreciated. I just need my firebase commands to work in the terminal, and why the global command won't register in my bash profile?
When you run npm install -g firebase it tries to install the firebase library and associated binaries into a system-wide location. You can determine where this location is by running npm prefix -g. In order for the firebase binary to be available to your bash session, the bin directory inside your global npm prefix must be on your path.
In Bash, an easy way to add a directory to your PATH is by modifying the .bashrc file in your home directory. Appending a line like so will add the global npm bin directory to your current PATH:
PATH="$(npm prefix -g)/bin:$PATH"
Once you have modified your PATH variable either open a new terminal session or run export PATH="$(npm prefix -g)/bin:$PATH" for the change to immediately take effect.
If ~/.bashrc is not being sourced on your machine, an easy fix is adding the following line to your ~/.bash_profile file:
source "$HOME/.bashrc"

Adding PATH to RStudio’s path

I am running RStudio on MacOS and need to use some custom command line tools like csvcut (part of csvkit) for a function that multiple people on our team will use on their machines.
If I run a system('pip install csvcut) (I am using this command as an example; normally, I’d run csvcut) from R in the terminal, it works (checks if the last version has been installed, etc.), just like if I do it from the command line terminal.
If I do the same thing from within RStudio:
> system('pip install csvkit')
sh: pip: command not found
If I do which pip in the terminal and copy-paste the address into RStudio, it works:
system('/anaconda3/anaconda/bin/pip install csvkit')
Requirement already satisfied (use --upgrade to upgrade): csvkit in /anaconda3/anaconda/lib/python3.4/site-packages
# etc.
^ that’s the output if I simply do system('pipinstall csvkit') from R in the terminal.
Unfortunately, I can’t even run which pip from within RStudio. (Also, I couldn’t automatically pip install csvkit for others’ machines, since it requires sudo access.) If there was a way to point RStudio to R’s path, that would be easier.
I found instructions on some website that said to create a .Renviron file and have a R_LIBS_USER=~/R/library line in it, but that didn’t help.
Try adding this line to your .Renviron file:
PATH=/anaconda3/anaconda/bin:$PATH

Resources