Git -p4: fatal: git was created without support for git -p4 (NO_PYTHON = 1)

I am trying to use git p4 on my linux machine. But for some reason, the problem with git-p4 is for some reason. When I run the git p4 command, I get:

fatal: git was built without support for git-p4 (NO_PYTHON=1) 

Any idea why this message is displayed? Anyway, can I fix it?

I am using a Ubuntu distribution with Kernel version 3.11.0.

Thanks in advance.

+6
source share
3 answers

You can download the git-p4.py file and move it to the desired directory:

 wget http://git.kernel.org/cgit/git/git.git/plain/git-p4.py?id=master -O git-p4 && chmod +x git-p4 sudo mv git-p4 /usr/lib/git-core/ 
+7
source

You can simply download the python script and install it somewhere, as described here:

https://git.wiki.kernel.org/index.php/GitP4#Adding_git-p4_to_an_existing_install

I found that I had to put git -p4 in / usr / lib / git -core on my Ubuntu system so that it was called by git:

$ sudo mv /path/to/git-p4.py /usr/lib/git-core/git-p4

$ git p4 clone //depot/somebranch

(You need to remove the .py file extension).

Or you can just run it manually (this is just a Python script and has no special dependencies).

eg.

$ /path/to/git-p4.py clone //depot/somebranch

The real problem is that the git-p4 Debian package has been removed because it depends on the non-free p4 client. See Error Report:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=715534

Thus, creating a non-free or contrib git -p4 debian package will fix this correctly.

+4
source

The git version included in Ubuntu 14.04 is not compiled with python support. git -p4 is written in python. This version of git includes a shell script called git -p4 that gives you a message.

You can:

  • Uninstall the binary git package and compile your own with python support.
  • Get a copy of git -p4 (python) and put it in your $PATH and remove the shell script git -p4.
+2
source

Source: https://habr.com/ru/post/971927/


All Articles