# Unable to clone GIT project

11 messages from 2012-09-16 to 2012-09-21. Participants: ankush_aggarwal@dell.com, Konstantin Khomoutov, Erik Faye-Lund, Jeff King, Ben Walton, Andreas Schwab.
Thread: https://gitlist.dev/t/31544

## ankush_aggarwal@dell.com, 2012-09-16 03:19

Subject: Unable to clone GIT project
Message-ID: <0D5A104FDD13FC4C9EE1E66F4FA3ABF60FCFDB65@NOIX10HMNOI01.AMER.DELL.COM>
URL: https://gitlist.dev/e/0D5A104FDD13FC4C9EE1E66F4FA3ABF60FCFDB65%40NOIX10HMNOI01.AMER.DELL.COM

```
I have created a GIT repository on Linux 64 bit machine.

When I tried to clone GIT repository on windows 7 machine then I am getting below error. 

Error:
git-upload-pack: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
fatal: The remote end hung up unexpectedly

anyone please help me resolve the issue.

Regards,
Ankush

```

## ankush_aggarwal@dell.com, 2012-09-16 10:30

Subject: RE: Unable to clone GIT project
Message-ID: <0D5A104FDD13FC4C9EE1E66F4FA3ABF60FCFDC27@NOIX10HMNOI01.AMER.DELL.COM>
URL: https://gitlist.dev/e/0D5A104FDD13FC4C9EE1E66F4FA3ABF60FCFDC27%40NOIX10HMNOI01.AMER.DELL.COM
In-Reply-To: <0D5A104FDD13FC4C9EE1E66F4FA3ABF60FCFDB65@NOIX10HMNOI01.AMER.DELL.COM>

```
Can anyone please help me out.

-----Original Message-----
From: git-owner@vger.kernel.org [mailto:git-owner@vger.kernel.org] On Behalf Of Aggarwal, Ankush
Sent: Sunday, September 16, 2012 8:49 AM
To: git@vger.kernel.org
Subject: Unable to clone GIT project

I have created a GIT repository on Linux 64 bit machine.

When I tried to clone GIT repository on windows 7 machine then I am getting below error. 

Error:
git-upload-pack: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
fatal: The remote end hung up unexpectedly

anyone please help me resolve the issue.

Regards,
Ankush
--
To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at  http://vger.kernel.org/majordomo-info.html

```

## Konstantin Khomoutov, 2012-09-16 10:46

Subject: Re: Unable to clone GIT project
Message-ID: <20120916104651.GF32381@localhost.localdomain>
URL: https://gitlist.dev/e/20120916104651.GF32381%40localhost.localdomain
In-Reply-To: <0D5A104FDD13FC4C9EE1E66F4FA3ABF60FCFDB65@NOIX10HMNOI01.AMER.DELL.COM>

```
On Sun, Sep 16, 2012 at 03:19:25AM +0000, Ankush_Aggarwal@DELL.com wrote:

> I have created a GIT repository on Linux 64 bit machine.
> 
> When I tried to clone GIT repository on windows 7 machine then I am getting below error. 
> 
> Error:
> git-upload-pack: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
> fatal: The remote end hung up unexpectedly
> 
> anyone please help me resolve the issue.
See [1] and generally search google for msysgit+libiconv.so.2 as it
contains links to other approaches to working around this problem.

Note that questions about technical issues with Git for Windows are
better asked on the msysgit mailing list [2] or in the project bug
tracker [3] (after searching both places for the relevant information).

1. http://groups.google.com/group/msysgit/msg/1c32f034869ffa93
2. http://groups.google.com/group/msysgit/
3. https://github.com/msysgit/msysgit/issues

```

## Erik Faye-Lund, 2012-09-16 19:48

Subject: Re: Unable to clone GIT project
Message-ID: <CABPQNSbPF=_a7-+JnojM2DQAkkj7ZLhSnO+n-Ab=LSrHge1dnQ@mail.gmail.com>
URL: https://gitlist.dev/e/CABPQNSbPF%3D_a7-%2BJnojM2DQAkkj7ZLhSnO%2Bn-Ab%3DLSrHge1dnQ%40mail.gmail.com
In-Reply-To: <20120916104651.GF32381@localhost.localdomain>

```
On Sun, Sep 16, 2012 at 12:46 PM, Konstantin Khomoutov
<flatworm@users.sourceforge.net> wrote:
> On Sun, Sep 16, 2012 at 03:19:25AM +0000, Ankush_Aggarwal@DELL.com wrote:
>
>> I have created a GIT repository on Linux 64 bit machine.
>>
>> When I tried to clone GIT repository on windows 7 machine then I am getting below error.
>>
>> Error:
>> git-upload-pack: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
>> fatal: The remote end hung up unexpectedly
>>
>> anyone please help me resolve the issue.
> See [1] and generally search google for msysgit+libiconv.so.2 as it
> contains links to other approaches to working around this problem.
>
> Note that questions about technical issues with Git for Windows are
> better asked on the msysgit mailing list [2] or in the project bug
> tracker [3] (after searching both places for the relevant information).

No. This is not a Git for Windows issue. The remote end is the one who
isn't able to load libiconv, you can tell from the fact that it
complains about "libiconv.so.2", not "libiconv-2.dll", and from the
fact that the client informs us that the remote end hung up.

Ankush: There's something wrong with the setup on your Linux machine;
most likely something related to the library path set up. What
protocol are you cloning over?

```

## Jeff King, 2012-09-17 20:21

Subject: Re: Unable to clone GIT project
Message-ID: <20120917202124.GC24888@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20120917202124.GC24888%40sigill.intra.peff.net
In-Reply-To: <CABPQNSbPF=_a7-+JnojM2DQAkkj7ZLhSnO+n-Ab=LSrHge1dnQ@mail.gmail.com>

```
On Sun, Sep 16, 2012 at 09:48:43PM +0200, Erik Faye-Lund wrote:

> >> git-upload-pack: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
> >> fatal: The remote end hung up unexpectedly
>
> [...]
>
> No. This is not a Git for Windows issue. The remote end is the one who
> isn't able to load libiconv, you can tell from the fact that it
> complains about "libiconv.so.2", not "libiconv-2.dll", and from the
> fact that the client informs us that the remote end hung up.

Yeah, it is definitely a problem on the remote system.

> Ankush: There's something wrong with the setup on your Linux machine;
> most likely something related to the library path set up. What
> protocol are you cloning over?

If I had to guess, I'd say it was ssh, the library is installed in a
non-standard place (e.g., because he built them as a regular user and
put them in his home directory), and LD_LIBRARY_PATH does not get set
properly by ssh for the incoming ssh session.

If that is the case, you can fix it with an entry in ~/.ssh/environment,
or by telling git that the remote side needs to do more than just run
git-upload-pack, like:

  git clone -u '. $HOME/.profile && git-upload-pack' ...

But I am just guessing. We need more information on how the remote
system is set up to really know.

-Peff

```

## Ben Walton, 2012-09-17 20:36

Subject: Re: Unable to clone GIT project
Message-ID: <CAP30j15=gz9w-ZU+b5Jm+fM1PmYgFrwBwAFxzAcPRsWgNcByOw@mail.gmail.com>
URL: https://gitlist.dev/e/CAP30j15%3Dgz9w-ZU%2Bb5Jm%2BfM1PmYgFrwBwAFxzAcPRsWgNcByOw%40mail.gmail.com
In-Reply-To: <20120917202124.GC24888@sigill.intra.peff.net>

```
> If I had to guess, I'd say it was ssh, the library is installed in a
> non-standard place (e.g., because he built them as a regular user and
> put them in his home directory), and LD_LIBRARY_PATH does not get set
> properly by ssh for the incoming ssh session.

This would be my guess as well.  If LD_LIBRARY_PATH is being relied
upon though, a more stable solution would be to rebuild git with
"-Wl,-rpath /path/containing/libiconv" in the LD_OPTIONS environment.
That would remove the need for LD_LIBRARY_PATH at runtime.  Any other
libraries linked in non-standard locations should also have a similar
option if the path to the library differs.

HTH.

Thanks
-Ben
-- 
---------------------------------------------------------------------------------------------------------------------------
Take the risk of thinking for yourself.  Much more happiness,
truth, beauty and wisdom will come to you that way.

-Christopher Hitchens
---------------------------------------------------------------------------------------------------------------------------

```

## ankush_aggarwal@dell.com, 2012-09-18 08:53

Subject: RE: Unable to clone GIT project
Message-ID: <0D5A104FDD13FC4C9EE1E66F4FA3ABF60FCFE5FB@NOIX10HMNOI01.AMER.DELL.COM>
URL: https://gitlist.dev/e/0D5A104FDD13FC4C9EE1E66F4FA3ABF60FCFE5FB%40NOIX10HMNOI01.AMER.DELL.COM
In-Reply-To: <20120917202124.GC24888@sigill.intra.peff.net>

```
All,

Thanks for reply but its not working still. Things which I have done till now is 

On Linux machine
	Installed libiconv-1.14 unded /usr/local/lib path.
		-rw-r--r-- 1 root root     912 Sep 15 20:40 libiconv.la
		lrwxrwxrwx 1 root root      17 Sep 15 20:40 libiconv.so -> libiconv.so.2.5.1
		lrwxrwxrwx 1 root root      17 Sep 15 20:40 libiconv.so.2 -> libiconv.so.2.5.1
		-rw-r--r-- 1 root root 1262349 Sep 15 20:40 libiconv.so.2.5.1
	export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

on local machine I have installed msysgit and trying to clone 

C:\Ankush Data\work\Test-GIT\trial_1>git clone ssh://bea@<IP>:/home/ankush/GIT/sample_project
Cloning into 'sample_project'...
bea@<IP>:'s password:
git-upload-pack: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
fatal: The remote end hung up unexpectedly



-----Original Message-----
From: Jeff King [mailto:peff@peff.net] 
Sent: Tuesday, September 18, 2012 1:51 AM
To: Erik Faye-Lund
Cc: Konstantin Khomoutov; Aggarwal, Ankush; git@vger.kernel.org
Subject: Re: Unable to clone GIT project

On Sun, Sep 16, 2012 at 09:48:43PM +0200, Erik Faye-Lund wrote:

> >> git-upload-pack: error while loading shared libraries: 
> >> libiconv.so.2: cannot open shared object file: No such file or 
> >> directory
> >> fatal: The remote end hung up unexpectedly
>
> [...]
>
> No. This is not a Git for Windows issue. The remote end is the one who 
> isn't able to load libiconv, you can tell from the fact that it 
> complains about "libiconv.so.2", not "libiconv-2.dll", and from the 
> fact that the client informs us that the remote end hung up.

Yeah, it is definitely a problem on the remote system.

> Ankush: There's something wrong with the setup on your Linux machine; 
> most likely something related to the library path set up. What 
> protocol are you cloning over?

If I had to guess, I'd say it was ssh, the library is installed in a non-standard place (e.g., because he built them as a regular user and put them in his home directory), and LD_LIBRARY_PATH does not get set properly by ssh for the incoming ssh session.

If that is the case, you can fix it with an entry in ~/.ssh/environment, or by telling git that the remote side needs to do more than just run git-upload-pack, like:

  git clone -u '. $HOME/.profile && git-upload-pack' ...

But I am just guessing. We need more information on how the remote system is set up to really know.

-Peff

```

## Andreas Schwab, 2012-09-18 09:06

Subject: Re: Unable to clone GIT project
Message-ID: <m2392fk8dx.fsf@igel.home>
URL: https://gitlist.dev/e/m2392fk8dx.fsf%40igel.home
In-Reply-To: <0D5A104FDD13FC4C9EE1E66F4FA3ABF60FCFE5FB@NOIX10HMNOI01.AMER.DELL.COM>

```
<Ankush_Aggarwal@DELL.com> writes:

> On Linux machine
> 	Installed libiconv-1.14 unded /usr/local/lib path.

Why do you need that library?  iconv is part of glibc.  Moreover, git
wouldn't link against libiconv anyway unless you explicitly ask for it.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

```

## ankush_aggarwal@dell.com, 2012-09-21 17:24

Subject: RE: Unable to clone GIT project
Message-ID: <0D5A104FDD13FC4C9EE1E66F4FA3ABF60FD03E66@NOIX10HMNOI01.AMER.DELL.COM>
URL: https://gitlist.dev/e/0D5A104FDD13FC4C9EE1E66F4FA3ABF60FD03E66%40NOIX10HMNOI01.AMER.DELL.COM
In-Reply-To: <m2392fk8dx.fsf@igel.home>

```
I have tried with iconv by adding its path in PATH and LIBRARY Path but failed to get any solution...
Still getting below error

c:\Ankush Data\work\Test-GIT\trial_1>git clone ssh://bea@<IP>:/home/bea/GIT/sample_project
Cloning into 'sample_project'...
bea@.<IP>:'s password:
git-upload-pack: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
fatal: The remote end hung up unexpectedly 


-----Original Message-----
From: Andreas Schwab [mailto:schwab@linux-m68k.org] 
Sent: Tuesday, September 18, 2012 2:36 PM
To: Aggarwal, Ankush
Cc: peff@peff.net; kusmabite@gmail.com; flatworm@users.sourceforge.net; git@vger.kernel.org
Subject: Re: Unable to clone GIT project

<Ankush_Aggarwal@DELL.com> writes:

> On Linux machine
> 	Installed libiconv-1.14 unded /usr/local/lib path.

Why do you need that library?  iconv is part of glibc.  Moreover, git wouldn't link against libiconv anyway unless you explicitly ask for it.

Andreas.

--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5 "And now for something completely different."

```

## ankush_aggarwal@dell.com, 2012-09-21 18:02

Subject: RE: Unable to clone GIT project
Message-ID: <0D5A104FDD13FC4C9EE1E66F4FA3ABF60FD03E94@NOIX10HMNOI01.AMER.DELL.COM>
URL: https://gitlist.dev/e/0D5A104FDD13FC4C9EE1E66F4FA3ABF60FD03E94%40NOIX10HMNOI01.AMER.DELL.COM
In-Reply-To: <0D5A104FDD13FC4C9EE1E66F4FA3ABF60FD03E66@NOIX10HMNOI01.AMER.DELL.COM>

```
Lovely... I found the solution. So want to share with you all.....

Solution : add /usr/local/lib to /etc/ld.so.conf and run sudo ldconfig

ld.so.conf file includes ld.so.conf.d/*.conf

so I created local-lib.conf having value /usr/local/lib and place local-lib.conf under /etc/ld.so.conf.d directory
after that I excuted ldconfig which is under /sbin

and problem has been resolved.

Thanks to all.


-----Original Message-----
From: git-owner@vger.kernel.org [mailto:git-owner@vger.kernel.org] On Behalf Of Aggarwal, Ankush
Sent: Friday, September 21, 2012 10:54 PM
To: schwab@linux-m68k.org
Cc: peff@peff.net; kusmabite@gmail.com; flatworm@users.sourceforge.net; git@vger.kernel.org
Subject: RE: Unable to clone GIT project

I have tried with iconv by adding its path in PATH and LIBRARY Path but failed to get any solution...
Still getting below error

c:\Ankush Data\work\Test-GIT\trial_1>git clone ssh://bea@<IP>:/home/bea/GIT/sample_project
Cloning into 'sample_project'...
bea@.<IP>:'s password:
git-upload-pack: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
fatal: The remote end hung up unexpectedly 


-----Original Message-----
From: Andreas Schwab [mailto:schwab@linux-m68k.org]
Sent: Tuesday, September 18, 2012 2:36 PM
To: Aggarwal, Ankush
Cc: peff@peff.net; kusmabite@gmail.com; flatworm@users.sourceforge.net; git@vger.kernel.org
Subject: Re: Unable to clone GIT project

<Ankush_Aggarwal@DELL.com> writes:

> On Linux machine
> 	Installed libiconv-1.14 unded /usr/local/lib path.

Why do you need that library?  iconv is part of glibc.  Moreover, git wouldn't link against libiconv anyway unless you explicitly ask for it.

Andreas.

--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5 "And now for something completely different."
--
To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at  http://vger.kernel.org/majordomo-info.html

```

## Andreas Schwab, 2012-09-21 18:37

Subject: Re: Unable to clone GIT project
Message-ID: <m2wqzn9q7u.fsf@igel.home>
URL: https://gitlist.dev/e/m2wqzn9q7u.fsf%40igel.home
In-Reply-To: <0D5A104FDD13FC4C9EE1E66F4FA3ABF60FD03E94@NOIX10HMNOI01.AMER.DELL.COM>

```
That doesn't solve the mystery why you need libiconv in the first place.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

```
