Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I need this command in Ansible.
php composer.phar require --dev squizlabs/php_codesniffer
Following works, but it is only added in "require" part of composer.json.
- name: require composer dev package
composer:
command: require
arguments: squizlabs/php_codesniffer
working_dir: ../web
How do I have to extend this Ansible task to have this package added into "require-dev" part of composer.json?
Many different ideas haven't worked. Thank you.
Try with
arguments: "--dev squizlabs/php_codesniffer"
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed last month.
Improve this question
I want to install go-fastping, but when I try using
go get -u github.com/tatsushid/go-fastping, this error gets displayed:
go: go.mod file not found in current directory or any parent directory.
'go get' is no longer supported outside a module.
To build and install a command, use 'go install' with a version,
like 'go install example.com/cmd#latest'
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.
so I changed to install:
go install github.com/tatsushid/go-fastping
Try 'go install github.com/tatsushid/go-fastping#latest' to install the latest version
and after I did changed to: go install github.com/tatsushid/go-fastping#latest
it worked but when I try to add it in the code it says that the module is not installed.
Your project most likely doesn't have a go.mod file.
Inside the root of your project run go mod init <module-name> to create a module and then you can run go get -u github.com/tatsushid/go-fastping to add this dependency to your project.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 1 year ago.
Improve this question
I ran
go get -u github.com/ipfs/ipfs-update
and got in the end of what it looks like an installation going on the following
go get: installing executables with 'go get' in module mode is deprecated.
Use 'go install pkg#version' instead.
For more information, see https://golang.org/doc/go-get-install-deprecation or run 'go help get' or 'go help install'.
github.com/ipfs/ipfs-update
go/pkg/mod/github.com/ipfs/ipfs-update#v1.7.1/main.go:318:21: cannot use lib.NewIpfsFetcher(distPath, 0) (type *lib.IpfsFetcher) as type migrations.Fetcher in argument to migrations.NewMultiFetcher:
*lib.IpfsFetcher does not implement migrations.Fetcher (missing Close method)
Then, used
ipfs-update versions
but didn't see the latest version.
To get that working I've used instead
go install github.com/ipfs/ipfs-update#latest
Then once running
ipfs-update versions
I got
Then could simply run
ipfs-update install v0.11.0
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
i have tried to run a new project of golang i've installed everything but I faced the following problem
$ go get github.com/paulsmith/gogeos/geos
#### #github.com/paulsmith/gogeos/geos
In file included from ..\..\go\pkg\mod\github.com\paulsmith\gogeos#v0.1.2\geos\coordseq.go:4:
./geos.h:1:10: fatal error: geos_c.h: No such file or directory
1 | #include <geos_c.h>
| ^~~~~~~~~~
compilation terminated.
Looking at the installation instructions on the project's page, it seems like you have to install GEOS first; see this part: https://github.com/paulsmith/gogeos#requirements
It can be as easy as $ apt-get install libgeos-dev on Ubuntu, but the link above has instructions for a from-source installation as well.
What happens in your case is that the Go package likely uses cgo to load C code from GEOS, and it fails immediately because GEOS is not installed, and cgo cannot find the headers files.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I want to use go modules, after a lot of searching, I just saw some website that said, enable go111module with this command:
GO111MODULE=on
But it's not a path variable, it does not even exist on my pc, so it shows me
GO111MODULE is not recognized as an internal or external command, operable
program, or batch file.
Some people said it's enabled by default on GO v1.16 but it's not working for me,
How do I understand it's not working?
I use:
go mod init
and
go get <some_packages>
It adds the new package to my go.mod but my code can't recognize it and I have an "Unresolved dependency" error in my go.mod file.
I use Goland to solve my problem using their GUI's and it solved my problem but their settings just work on the current project and don't work globally.
What can I do? (I'm a Windows 10 user, Go version 1.16)
Answer (Update):
Set a path variable like this by yourself:
After that, run the command:
go env
You will have this line at first line:
set GO111MODULE=on
Yes its not a path variable.
It is a go environmental variable.
Yes is is available by default actually.
On your terminal, type
go env | grep "GO111MODULE"
That should show you what that variable is set to
You can try the same with other go env variables eg GOPROXY, GOPRIVATE etc just to satisfy yourself.
The output GO111MODULE="" means it is on (since Go 1.16)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
When I run my code in terminal, I get this error/message:
module 'socket.http' not found:
no field package.preload['socket.http']
no file '/usr/local/share/lua/5.2/socket/http.lua'
no file '/usr/local/share/lua/5.2/socket/http/init.lua'
no file '/usr/local/lib/lua/5.2/socket/http.lua'
no file '/usr/local/lib/lua/5.2/socket/http/init.lua'
no file './socket/http.lua'
no file '/usr/local/lib/lua/5.2/socket/http.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './socket/http.so'
no file '/usr/local/lib/lua/5.2/socket.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './socket.so'
Some sources led me to look into LuaSocket, but I still have no idea on what to do or how I would install that.
There are several places where a guide to install LuaSocket is available. Some of them are listed as follows:
http://w3.impa.br/~diego/software/luasocket/installation.html
https://github.com/diegonehab/luasocket/tree/cvs-diego
http://luarocks.org/
My preferred method would be to install LuaRocks and then use the following command in terminal:
luarocks install luasocket
A few more points. While configuring luarocks you may need to point to lua installation directory for example:
./configure --with-lua=/opt/lua53/
There are similar options:
--with-lua-bin
--with-lua-include
You can use any of these but make sure the desired directory structure is available in the directory you have mentioned!