Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8871463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:59:55+00:00 2026-06-14T17:59:55+00:00

Have installed Homebrew and have downloaded git, but it won’t link. Get this error

  • 0

Have installed Homebrew and have downloaded git, but it won’t link. Get this error message:

Consider amending your PATH so that /usr/local/bin
occurs before /usr/bin in your PATH.
Warning: You have a non-Homebrew 'pkg-config' in your PATH:
  /opt/sm/pkg/active/bin/pkg-config

`./configure` may have problems finding brew-installed packages using
this other pkg-config.
unknown7cd1c3e98b07:~ pdenlinger$ brew install git
Error: git-1.8.0 already installed, it's just not linked
unknown7cd1c3e98b07:~ pdenlinger$ brew link git
Linking /usr/local/Cellar/git/1.8.0... Warning: Could not link git. Unlinking...

Error: Could not symlink file: /usr/local/Cellar/git/1.8.0/bin/gitk
Target /usr/local/bin/gitk already exists. You may need to delete it.
To force the link and delete this file, do:
  brew link --overwrite formula_name

To list all files that would be deleted:
  brew link --overwrite --dry-run formula_name
unknown7cd1c3e98b07:~ pdenlinger$ brew link git

What can I do to fix this?

Response from vi command:

sudo vi /etc/paths     /usr/local/bin  /usr/local/sbin   /usr/bin   /bin   /usr/sbin   /sbin
7 files to edit


E325: ATTENTION
Found a swap file by the name "/etc/.paths.swp"
          owned by: root   dated: Thu Nov 22 09:10:09 2012
         file name: /private/etc/paths
          modified: no
         user name: root   host name: unknown7cd1c3e98b07.att.net
        process ID: 98069 (still running)
While opening file "/etc/paths"
             dated: Tue Aug 21 15:44:10 2012

(1) Another program may be editing the same file.
    If this is the case, be careful not to end up with two
    different instances of the same file when making changes.
    Quit, or continue with caution.

(2) An edit session for this file crashed.
    If this is the case, use ":recover" or "vim -r /etc/paths"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file "/etc/.paths.swp"
    to avoid this message.

Swap file "/etc/.paths.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:59:56+00:00Added an answer on June 14, 2026 at 5:59 pm

    Possible duplicate of this question … The solution to this was

    open your /etc/paths file, put /usr/local/bin on top of /usr/bin

    $ sudo vi /etc/paths
    /usr/local/bin
    /usr/local/sbin
    /usr/bin
    /bin
    /usr/sbin
    /sbin
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have installed git and svn with homebrew on my mac running 10.7.4. There
I have installed GIT 1.7.7.1 via homebrew and had to do a sudo brew
I'm trying to get into NDS Homebrew, and have installed devkitPro and PALib, and
I'm trying to install node.js via Homebrew. Unfortunately, I get this error: ➜ ~
I have installed Android SDK and packages. Since I had an error when opening
I have been trying to install the R language with homebrew but when I
I went to Link . It showed a command to get started with homebrew.
I have python3 installed via homebrew: brew install python3 --framework I have the vim
I am trying ti use carrierWave. I have installed imagemagic using homebrew and both
I am using Mac OS X 10.7.2 with Git 1.7.8.2 installed using Homebrew, cvsps

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.