threads / discuss / 31544

Unable to clone GIT project

Subject: Unable to clone GIT project

## tl;dr

11 messages between Sep 16, 2012 and Sep 21, 2012.

replies: 10people: 6as markdown or json

ankush_aggarwal@dell.com· Sep 16, 2012, 03:19 UTC · lore
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· Sep 16, 2012, 10:30 UTC · re: ankush_aggarwal@dell.com · lore

RE: Unable to clone GIT project

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· Sep 16, 2012, 10:46 UTC · re: ankush_aggarwal@dell.com · lore

Re: Unable to clone GIT project

On Sun, Sep 16, 2012 at 03:19:25AM +0000, Ankush_Aggarwal@DELL.com wrote:
Show 9 quoted lines
> 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· Sep 16, 2012, 19:48 UTC · re: Konstantin Khomoutov · lore

Re: Unable to clone GIT project

On Sun, Sep 16, 2012 at 12:46 PM, Konstantin Khomoutov <flatworm@users.sourceforge.net> wrote:

Show 17 quoted lines
> 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· Sep 17, 2012, 20:21 UTC · re: Erik Faye-Lund · lore

Re: Unable to clone GIT project

On Sun, Sep 16, 2012 at 09:48:43PM +0200, Erik Faye-Lund wrote:
Show 9 quoted lines
> >> 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· Sep 17, 2012, 20:36 UTC · re: Jeff King · lore

Re: Unable to clone GIT project

> 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· Sep 18, 2012, 08:53 UTC · re: Jeff King · lore

RE: Unable to clone GIT project

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:
Show 11 quoted lines
> >> 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· Sep 18, 2012, 09:06 UTC · re: ankush_aggarwal@dell.com · lore

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· Sep 21, 2012, 17:24 UTC · re: Andreas Schwab · lore

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."

ankush_aggarwal@dell.com· Sep 21, 2012, 18:02 UTC · re: ankush_aggarwal@dell.com · lore

RE: Unable to clone GIT project

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· Sep 21, 2012, 18:37 UTC · re: ankush_aggarwal@dell.com · lore

Re: Unable to clone GIT project

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."

← back to recent threads