Missing package github.com/docker/docker/autogen/dockerversion - docker

Trying to compile Docker in Windows according to the instructions here:
How to compile Docker on Windows
and getting this error message:
cannot find package "github.com/docker/docker/autogen/dockerversion" in any of:
Tried browsing to https://github.com/docker/docker/autogen/dockerversion but getting a 404; can anyone tell me how to get this using GIT client?

I had the same issue, the author has updated the post as you have seen to include the use of GitBash. You will need to update your source to get the new 'hack' directory content used in the instructions he outlines as per below:
git clone --depth 1 https://github.com/docker/docker.git /c/gopath/src/github.com/docker/docker
cd /c/gopath/src/github.com/docker/docker
export GOPATH=/c/gopath:/c/gopath/src/github.com/docker/docker/vendor
export DOCKER_CLIENTONLY=1
chmod +x hack/make/.go-autogen && hack/make/.go-autogen
cd docker
go build
Do you have GitBash installed? All of the instructions he provides need to be run in a GitBash window not the Windows Command window now.
I have built it successfully, so if you need any more help I may be of use.

Related

./prereqs-ubuntu.sh Error: Ubuntu focal is not supported

I'm trying to use composer and for the same I'm using the below command for installation.
curl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh
chmod u+x prereqs-ubuntu.sh
These above commands successfully executed.
But when I executed this command (./prereqs-ubuntu.sh) then I'm getting below error
Terminal Throws Error ///Ubuntu focal is not supported
Please help
Hyperledger Composer Installation
I also find this kind of error during Hyperledger Composer installation this problem mainly depends on the Ubuntu version.
Steps to overcome this problem.
upgrade ubuntu version as per your ubuntu versoin please follow:
https://www.fosslinux.com/38303/how-to-upgrade-to-ubuntu-20-04-lts-focal-fossa.htm
open file prereqs-ubuntu.sh with your compatible editor
update line:
#Array of supported versions
declare -a versions=('trusty' 'xenial' 'yakkety', 'bionic');
with
# Array of supported versions
declare -a versions=('trusty' 'xenial' 'yakkety', 'bionic', 'focal');
After saving this file
Run command: ./prereqs-ubuntu.sh
I hope this problem will resolve if anything please feel free to write.

Jenkins cannot find g++

I am learning all of these new technologies. I have a home server for private development with latest version of centos 7.6 (minimal installation). I am trying to keep the server as light as possible.
I have installed jenkins (v2.164.2) and it is up and running correctly. I have created a new Freestyle project to compile a g++ project hosted on another own gogs server. I have defined gogs url and credentials and then added the following in the execute shell command:
which g++; make clean; make;
When I press the "Build Now" button, it fails with the following message:
which: no g++ in (/sbin:/usr/sbin:/bin:/usr/bin)
Cloning the repository, etc seems to be working fine.
I have NOT installed the default g++ version but instead I have installed the one that comes with devtools-7 (g++ v7.3.1). I have created a new file under /etc/profile.d/devtools.sh with the following text:
!#/bin/bash
source scl_source enable devtoolset-7
If I login into a bash shell in the server and then run which g++, I get the expected output.
Finally, the question: why jenkins is not picking this up? As far as I know, adding that file under /etc/profile.d ensures that everyone will be able to access g++.
Thanks very much in advance for any help.
I have managed to fix it at the end. I leave the question just in case someone else runs into the same problem. I only had to add the following line as first line in the "execute shell" command field:
#!/bin/bash -l
make clean; make;
That #!/bin/bash -l did the trick. (Please mind the -l).
Found it here: What shell does Jenkins use?

Apache Jena Commands not found

I'm trying to set up my system (Ubuntu 16.04) with Apache Jena 3.10.0, and followed the provided instructions, but I'm unable to access any of the commands that I should have access to.
For example, sparql --version and bin/sparql --version both return:
sparql: command not found
I have downloaded and extracted the files to /home/[user]/apache-jena-3.10.0, then run:
export JENA_HOME=/home/[user]/apache-jena-3.10.0
export PATH=$PATH:$JENA_HOME/bin
The command cd $JENA_HOME successfully goes the apache-jena-3.10.0 directory.
I feel that there is a basic linux thing here that I'm missing, but I've tried a lot of things and had no luck so far. Any help would be greatly appreciated. Thanks!
The files in the download from Apache were not marked as executable. From the main apache-jena-3.10.0 directory, chmod -R 775 bin changed all files so I could run them from command line.

"bash: aws: command not found" on Windows 7 in Git Bash

I'm trying to use AWS CLI to access CodeCommit. And it's sort of working. I am able to use the aws command in the Windows command prompt. However, when I try to access it using the Git Bash shell, it says
"bash: aws: command not found."
Additionally, when I try to do do a git clone in the Windows command promt, trying to access CodeCommit, it tries to use aws using the credentials helper, which also results in "aws: command not found."
I followed the instructions in the AWS documentation, which suggests some directories to add to the PATH:
https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-windows.html#awscli-install-windows-path
Here's what my PATH variable looks like:
C:\Users\ddrayton\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\ddrayton\AppData\Local\Programs\Python\Python36\;C:\Windows\System32;;C:\Program
Files\Docker
Toolbox;C:\Users\ddrayton\MyCurl;%USERPROFILE%\AppData\Local\Programs\Python\Python36\Scripts;C:\Program
Files\Amazon\AWSCLI;C:\Program Files
(x86)\Amazon\AWSCLI;C:\Users\ddrayton\AppData\Local\Programs\Python\Python36;C:\Users\ddrayton\AppData\Local\Programs\Python\Python36\Scripts
But I'm not sure if it's a PATH problem, since the Windows command prompt has no problem accessing the "aws" command.
Any ideas?
Fixed this by simply installing the AWS CLI again but this time using Git Bash instead of the Windows command prompt.
pip install awscli
If anyone could provide some insight as to why this was necessary, it would be appreciated.
In my case, I think a recent-to-me update to the AWS CLI changed what's run to being aws.cmd (full path C:\Program Files\Amazon\AWSCLI\bin\aws.cmd)
Git Bash needs the extension aws.cmd to make it work.
In Bash, you could try typing aws.cmd vs aws. If the former works, but not the latter, you can do alias aws='aws.cmd' in your bash startup script. I don't know if it's the best solution, but it worked for me.
FWIW, I think it's related to this:
https://unix.stackexchange.com/questions/280528/is-there-a-unix-equivalent-of-the-windows-environment-variable-pathext
On Windows 10 I was installing just once from GitBash via pip install awscli --upgrade --user as described in AWS manual for CLI installation for Linux
It installed aws executables into %USERPROFILE%\AppData\Roaming\Python\Python37\Scripts
After that just add this folder to your PATH. Re-open GitBash or cmd - it should work from both places

How to install Ngrok 2.0 on linux subsystem on Windows 10

I am trying to use Ngrok to create an introspected tunnel to localhost webhook development tool on my Linux subsystem (Powershell --> bash)
I try to install ngrok using the following:
sudo apt install ngrok-client
From what I understand the sudo command used installs ngrok v 1.6.
When I attempt to execute ngrok 80 I get an error:
Invalid address server_addr 'ngrokd.ngrok.com:443'
I searched for this in another post and was informed that ngrok v. 1.6 is obsolete and in order to continue using ngrok would be to upgrade to 2.0
Testing PayPal with Rails
It's advised to download from the website http://ngrok.com, which is simple enough, but what is the correct way to download for linux subsystem use? Should I download for Linux and unzip? Or am I suppose to download for Windows?
Let me know if I'm misunderstanding anything
I use ubuntu since years, I trust the online instructions so either do:
sudo apt-get update
sudo apt-get install ngrok-client
or try to use this instruction and let me know if you have problems
the same instructions are included hear
$ unzip /path/to/ngrok.zip
$ is just the sign from your terminal. You do not need to input $, but you need to open the terminal (ctrl+alt+t), run the unzip command to unzip the folder.
You will find the folder under your downloads. So / is the root of your machine. You need to go inside your home folder which will be /home so you do cd (change directory) followed by that path
cd /home
then you do ls to list all the directories. You should see your profile with your name username. You should be able to get in the download folder with cd <username>/Downloads where <username> should be replaced with your personal folder name
At this point you are inside the Downloads directory. You can do an ls in your terminal, find the name of the file you downloaded (should be something like ngrok-stable-linux-amd64.zip) and run
unzip <file-name.zip>
where file name is the file you downloaded (something like ngrok-stable-linux-amd64.zip) or you can go back to the root directory and run
cd /
unzip /home/<username>/Downloads/<yourfile.zip>
Read the documentation on how to use ngrok. Try it out by running it from the command line:
./ngrok help
Also I read from the documentation, that you can set up that address
There is some discussion online about this
Testing PayPal with Rails
I can help you more but I need your feedback
You can try this from the official docs.
sudo tar xvzf ~/Downloads/ngrok-v3-stable-linux-amd64.tgz -C /usr/local/bin

Resources