Trying to install go-swagger on Ubuntu.
I have installed brew(Linuxbrew):
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
Next I did:
brew tap go-swagger/go-swagger
brew install go-swagger
typing swagger version
it answers: swagger: command not found.
anything else(-help, -version not working too)
What I did wrong?
Use this:
git clone https://github.com/go-swagger/go-swagger
cd go-swagger
go install ./cmd/swagger
Verify using:
swagger version
Running brew tap go-swagger/go-swagger && brew install go-swagger and then re-running command go-swagger worked for me. Any more details that can be provided here?
This command may also assist you, since you're utilizing go already... might be problematic if utilizing go modules or not.
go get -u github.com/go-swagger/go-swagger/cmd/swagger
You're missing $GOPATH/bin in your path reason why it cannot find the it
Potential fix:
echo 'export PATH="${GOPATH-"~/go"}/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
To install go-swagger run below command in GO PATH
go get -u github.com/go-swagger/go-swagger/cmd/swagger
To check the version and help run
swagger version
swagger -h
Related
My mac is having MacOS 10.12.4 (Sierra). And I have installed homebrew using command line. This is what look like when I run "brew config" command.
Then I wanted to install class-dump using following command.
"brew install class-dump". But when it gives me following error. Can some one tell me the reason and what should I do?
I was able to solve the problem by installing class-dump manually without using home brew. I downloaded the class-dump in using this link. Then copy the class-dump file to the following location "/usr/local/bin". Then all works fine
Here is a one liner for the lazy people if you already have wget:
$ wget -qO- http://stevenygard.com/download/class-dump-3.5.tar.gz | tar xvz - -C /usr/local/bin
I'm new on golang. According this instructions, to install go-bindata, I should use this command:
$ go get -u github.com/jteeuwen/go-bindata/...
I did it. After that, I checked on $GOPATH/src/jteeuwen/go-bindata/ and there's a file go-bindata.a. It seems like it was installed, but it doesn't work:
$ go-bindata
-bash: go-bindata: command not found
Please, what am I doing wrong?
EDIT: I'm using OS X
You'll need to add $GOPATH/bin to your $PATH.
I'm new using Mac and I'd like to upgrade the available cURL-7.43.0 to the last version cURL-7.47.1?
I'm looking at some pages, but they say to avoid upgrading the originals on OSX.
Any help please?
Thanks
Take a look at installing homebrew, it's a package manager that allow you to install and update binaries without overwriting your original ones.
You need then to prepend your PATH with homebrew's (/usr/local/bin by default).
If you don't when you run curl the system will fetch the default OSX one (/usr/bin/curl) which isn't updated.
Use which curl when you're done to check !
I had this issue as well with OSx locating curl at /usr/bin. If you install curl with brew install curl and then do brew info curl it will tell you the following near the bottom of the post-op output:
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> ~/.bash_profile
After running that command to update ~/.bash_profile you need to source it by executing . ~/.bash_profile
I am trying to install symfony 3.0 on my macos.
According to their official website, I need to type on my console:
$ sudo curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony
then I type my password
and then I type:
$ sudo chmod a+x /usr/local/bin/symfony
and then, according to the official symfony documentation, there is nothing more simple than typing;
$ symfony new my_project_name
but my console returns a red message that says:
Task "new" is not defined.
This is probably because I already had an old version of symfony installed on my machine, but I am not sure
The problem is that I see little documentation around this.
Probably you are pointing on an old version of the installer.
You can check if is the lastest version with the --version option:
>symfony --version
You can update your current version as following:
1) update your installer
>symfony self-update
or with sudo, depends how you install it:
>sudo symfony self-update
2) Then try again:
>symfony new my_project_name
Hope this help
I am trying to install sphinx on a remote machine.
Since I don't have an access to the root, I did this:
$bash
$mkdir -p ~/local/lib/python2.7/site-packages
$export PYTHONPATH=$PYTHONPATH:~/local/lib/python2.7/site-packages
$export PATH=$PATH::~/local/lib/python2.7/site-packages
$easy_install -U --prefix=$HOME/local Sphinx
But apparently, $easy_install doesn't build sphinx-quickstart; when I type
$sphinx-quickstart
I get the following message:
bash: sphinx-quickstart: command not found
I tried
find $HOME -name sphinx-quickstart
and no result was found. However, I can import sphinx inside python:
$python
And then
>>import sphinx
works. Any idea why sphinx-quickstart doesn't work?
An alternative way to invoke sphinx-quickstart is to explicitly load Sphinx's quickstart module. For Sphinx v1.7+:
python -m sphinx.cmd.quickstart
For older versions of Sphinx:
python -m sphinx.quickstart
For example:
$ /c/Python35/python -m sphinx.quickstart
Welcome to the Sphinx 1.6.2 quickstart utility.
...
I found the solution in this webpage:
User (root/sudo free) installation of Python modules.
In section 3. Python 2.6+ he mentioned that the command line commands are in
~/local/bin
Although I had put ~/local/lib/python2.7/siste-packages in the path, the ~/local/bin directory was not in the path. So all I did
$export PYTHONPATH=$PYTHONPATH:~/local/bin
and now it works.
I don't know why find $HOME -name sphinx-quickstart did not find sphinx-quickstart
In MacOS (Catalina) and zsh:
I installed sphinx with brew and had the same problem as you.
Solution:
Installed it with conda as conda install sphinx and now it works for me
$ sphinx-quickstart
Welcome to the Sphinx 2.3.0 quickstart utility.
Installation Guide
Note, if you're in a virtual environment and using poetry to run
poetry run py -m sphinx.cmd.quickstart
where py is the python launcher for Windows.
Have added an answer for installation on macOS using brew here
For new users, installing with brew gives the following caveats:
==> sphinx-doc
sphinx-doc is keg-only, which means it was not symlinked into /usr/local,
because this formula is mainly used internally by other formulae.
Users are advised to use `pip` to install sphinx-doc.
If you need to have sphinx-doc first in your PATH, run:
echo 'export PATH="/usr/local/opt/sphinx-doc/bin:$PATH"' >> ~/.zshrc
Running the echo command:
echo 'export PATH="/usr/local/opt/sphinx-doc/bin:$PATH"' >> ~/.zshrc
should fix the issue.
Don't miss source-ing the .zshrc after the updating it:
source ~/.zshrc