Skip to content

Instantly share code, notes, and snippets.

@marcosgdf
Created July 27, 2015 19:16
Show Gist options
  • Save marcosgdf/034f452c20aeb860296d to your computer and use it in GitHub Desktop.
Save marcosgdf/034f452c20aeb860296d to your computer and use it in GitHub Desktop.
Fix errors applying patches generated by PHPStorm in Mac OS

If you face an error like:

patching file xx
Assertion failed: (s && size), function savebuf, file /SourceCache/gpatch/gpatch-3/patch/util.c, line 424.
Abort trap: 6

Because the version of GNU Patch that bundles Mac OS is 6 years old, it has some bugs that were solved later. To fix it you just have to:

  1. Download latest stable version from http://ftp.gnu.org/gnu/patch/
  2. Untar it
  3. Open terminal and access the directory of the uncompressed archive
  4. Execute "./configure && make && make install"
  5. You are done! Latest version will be located at /usr/local/bin. Just reopen the terminal and you'll have the latest version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment