I installed the composer-cli globally but it shows me error - hyperledger-composer

I installed the composer-cli globally but it shows me error
"-bash: composer: command not found" at mac os sierra

Please make sure you did not install using sudo and that you check that the install actually worked. e.g. it will fail if you don't have XCode installed.

Yes to add to the point mentioned above.After installing Xcode it didnt work out for me . So i changed my node version from
11
to
8.8.15
and did npm install -g composer-cli. It worked for me .

Related

Xcode: Command not found

I have installed Xcode on my MacBook.
I checked that I have the XCode command line tool also installed as shown below:
I need to use Xcode command to install some dependencies, so I opened my terminal and run the command:
But I get Xcode: Command not found error. Why? How to get rid of this issue?
Okk, if you're trying to install the AWS ELastic beanstalk CLI (you're coming from EB CLI Installer on Github here)
then the line Xcode openssl zlib readline refers to all the packages that are prerequisites to the installation and not a command that you should run.
In short use:
brew install openssl
brew install zlib
brew install readline
And make sure Xcode is installed through which g++ if you get /usr/bin/g++
you're all set and you can proceed to the following steps

I can't install gcc with Mojave 10.14

I try to install a fortran compiler on my Mojave system thanks to the command
brew install gcc
Unfortunately, I have this error message
The directory that should contain system headers does not exist:
/usr/include
I found out that I had to install the latest update of the Command Line Tools, which I did and update Xcode to 10.1 but the error remains the same.
I tried to update brew but it said
Error: /usr/local must be writable!
and brew doctor said that my version of Xcode is outdated although I just updated to the 10.1 version
So... any help is appreciated.
Thanks everybody
Zhiv
I found very detailed instructions for compiling GCC by "Paul" at https://solarianprogrammer.com/2017/05/21/compiling-gcc-macos/
In particular this step will address your problem:
macOS Mojave changed the location of the system headers, this broke
the GCC 8 build process. In order to build GCC install the required
header files in the old location:
cd /Library/Developer/CommandLineTools/Packages/
open .
Update the permissions using:
sudo chown -R /usr/local/* /usr/local/.git; brew update

Unable to install Hyperledger-Composer on local as well as remote. Always getting stuck at ./createPeerAdminCard.sh

I am trying to install Hyperledger-composer on my ubuntu instance on my local as well as on remote instance. But I am getting the same error everywhere which is:
"No version of composer-cli has been detected, you need to install composer-cli at v0.19 or higher"
Things which I have already tried are:
--Installing the composer-cli V0.19
--Reinstalling Node using NVM.
--Although it is not advised but I also tried to execute commands using sudo.
I am unable to figure out the exact issue here. Help would be appreciated.
What happens if you run
composer --version
Does it return v0.19.0 or an error?
Did you install composer globally using the -g flag?
Did you see this post already?
No version of composer-cli has been detected

How to install Truffle

I was stuck when I install truffle to my Mac PC.
I tried to install it with npm install -g truffle and it worked after I made a folder for global install.
However, when I try to run Truffle
truffle init
it returns -bash: truffle: command not found
I also reinstall it and run it again but nothing was changed.
How can I deal with this issue ?
It would be really appreciated if you explained in detail.
I think on windows you are suppose to use truffle.cmd instead of truffle.
So try,
truffle.cmd init
Keeping in mind that truffle init is depreciated so you should try using
truffle.cmd unbox metacoin
You can reinstall it by this commands
npm uninstall -g truffle
Install it by
npm install -f truffle
Thanks

Error Message "Xcode alone is not sufficient on Sierra"

I'd like to install openCV to vectorize image, but there's a series error message regarding Xcode and Ruby.
First, I use terminal to install openCV, brew install opencv.
Then, I got error message indicating that the system doesn't like my ruby version.
/usr/local/Homebrew/Library/Homebrew/brew.rb:12:in `<main>':
Homebrew must be run under Ruby 2.3! You're running 2.0.0. (RuntimeError)
So, I want to upgrade my ruby. I followed several update strategy from this post. First ruby upgrade trial: brew link --overwrite ruby & brew unlink ruby && brew link ruby and get
Error: No such keg: /usr/local/Cellar/ruby
Then second ruby upgrade trial: brew upgrade ruby and see the following error message.
Error: Xcode alone is not sufficient on Sierra.
Install the Command Line Tools:
xcode-select --install
This error message means I need to install Xcode which I already install. So, I check my Xcode status with code-select -p and get /Applications/Xcode.app/Contents/Developer which means I am fine.
I saw a comment regarding where you install python could be a big issue. Quote from the source:
If you see /usr/local/bin/python3 then you are correctly using the Homebrew version of Python. If the output is instead /usr/bin/python3 then you are incorrectly using the system version of Python.
I check which python3 and get
/Users/******/anaconda3/bin/python3
Could this be the problem? How can I change system version to local?
Let me explain this myself so people won't make the same mistakes.
When I saw the last line of the error message
Error: Xcode alone is not sufficient on Sierra.
Install the Command Line Tools:
xcode-select --install
My thought was: I already have Xcode why the system ask me to "reinstall" it. However, thanks for #SamiKuhmonen # Beartech #patrick kuang suggestion, I search a page (in Mandarin). xcode-select --install does not reinstall the whole Xcode. It means install some missing command line tools which is required by installing Ruby.
Trying to install k8s package via brew , I just got the same issue a while ago saying in the terminal :
Error: Xcode alone is not sufficient on Sierra.
Install the Command
Line Tools: xcode-select --install
You need to download *.dmg file; named Command Line Tools (macOS x.x.x) for XCode N . Search on it here : https://developer.apple.com/download/more/ . You must have developer account.
Then, congrats! 🎉
update for 2019
macOS Mojave 10.14.5
Use Xcode10.2 for macOS 10.14
I had the same issue in my Macbook Pro on Sierra. Apart from updating Xcode from the App Store, I also installed the command line utilities using the xcode-select --install command.
After the update steps, brew commands started working fine. I also updating my OS during this time.
I got the same message despite having Xcode and the command line tools already being installed a long time ago and updated numerous times.
I think it is the Apple way of telling you that Xcode command line tools need to be updated, as the App Store showed me the below:
After executing the xcode-select --install command, the update disappears from the App Store, which means they are exactly the same thing.
I had the same problem. I installed 'Command Line Tools for XCode' (choose appropriate version) from https://developer.apple.com/download/more/ and restarted my terminal. Issue resolved :)

Resources