fault,segmentation,git,为什么git 如何解决冲突

ubuntu - Segmentation Fault using Git on Virtual Machine - Stack Overflow
Join Stack Overflow to learn, share knowledge, and build your career.
or sign in with
I have just created an Ubuntu virtual machine for web development and I want to use Git for version control, however I'm running into some problems.
[The reason that I mention the VM is simply because I've never encountered these problems before with a normal install.]
I used git init to initialize a new Git repo and I immediately receive the following error: segmentation fault.
Git appears to actually initialize the repository (by creating the relevant files), but when I try to git status or git add I receive errors saying fatal: not a Git repository.
Any insight into this problem would be appreciated.
Here is the info requested by @sehe:
servace85@ubuntu:/var/www$uname -a
Linux ubuntu 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC
x86_64 x86_64 GNU/Linux
servace85@ubuntu:/var/www$lsb_release -a
Distributor ID: Ubuntu
Description:
Ubuntu 11.04
servace85@ubuntu:/var/www$dpkg --status git
Package: git
Status: install ok installed
Priority: optional
Section: vcs
Installed-Size: 10624
Maintainer: Ubuntu Developers &ubuntu-devel-discuss@&
Architecture: amd64
Version: 1:1.7.4.1-3
Replaces: cogito (&& 0.16rc2-0), git-core (&& 1:1.7.0.4-1.), gitweb (&& 1:1.7.4~rc1)
Provides: git-completion, git-core
Depends: libc6 (&= 2.7), libcurl3-gnutls (&= 7.16.2-1), libexpat1 (&= 1.95.8), zlib1g (&= 1:1.2.0), perl-modules, liberror-perl, git-man (&& 1:1.7.4.1), git-man (&& 1:1.7.4.1-.), emacsen-common
Recommends: patch, less, rsync, ssh-client
Suggests: git-doc, git-el, git-arch, git-cvs, git-svn, git-email, git-daemon-run, git-gui, gitk, gitweb
Breaks: cogito (&= 0.18.2+), git-buildpackage (&& 0.4.38), gitosis (&& 0.2+), gitpkg (&& 0.15), gitweb (&& 1:1.7.4~rc1), guilt (&& 0.33), qgit (&& 1.5.5), stgit (&& 0.15), stgit-contrib (&& 0.15)
Conflicts: git-core (&& 1:1.7.0.4-1.)
Conffiles:
/etc/bash_completion.d/git 8f45ec9aea549daa6050b
Description: fast, scalable, distributed revision control system
Git is popular version control system designed to handle very large
projects with
it is used for many high profile
open source projects, most notably the Linux kernel.
Git falls in the category of distributed source code management tools.
Every Git working directory is a full-fledged repository with full
revision tracking capabilities, not dependent on network access or a
central server.
This package provides the git main components with minimal dependencies.
Additional functionality, e.g. a graphical user interface and revision
tree visualizer, tools for interoperating with other VCS's, or a web
interface, is provided as separate git* packages.
Original-Maintainer: Gerrit Pape &pape@smarden.org&
Homepage: /
servace85@ubuntu:/var/www$ find /etc/apt -iname '*.list' | xargs cat | grep -v ^# | sort -u
deb /linux/chrome/deb/ stable main
deb /ubuntu natty main
deb /ubuntu natty-security main restricted
deb /ubuntu natty-security multiverse
deb /ubuntu natty-security universe
deb http://us./ubuntu/ natty main restricted
deb http://us./ubuntu/ natty multiverse
deb http://us./ubuntu/ natty universe
deb http://us./ubuntu/ natty-updates main restricted
deb http://us./ubuntu/ natty-updates multiverse
deb http://us./ubuntu/ natty-updates universe
deb-src /ubuntu natty main
deb-src /ubuntu natty-security main restricted
deb-src /ubuntu natty-security multiverse
deb-src /ubuntu natty-security universe
deb-src http://us./ubuntu/ natty main restricted
deb-src http://us./ubuntu/ natty multiverse
deb-src http://us./ubuntu/ natty universe
deb-src http://us./ubuntu/ natty-updates main restricted
deb-src http://us./ubuntu/ natty-updates multiverse
deb-src http://us./ubuntu/ natty-updates universe
servace85@ubuntu:/var/www$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
servace85@ubuntu:/var/www$ echo $LD_LIBRARY_PATH
servace85@ubuntu:/var/www$ echo $LD_PRELOAD
servace85@ubuntu:/var/www$ which git
/usr/bin/git
servace85@ubuntu:/var/www$ file $(which git)
/usr/bin/git: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
servace85@ubuntu:/var/www$ ldd $(which git)
linux-vdso.so.1 =&
(0x00007fff841ff000)
libz.so.1 =& /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1eee16e000)
libpthread.so.0 =& /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1eedf50000)
libc.so.6 =& /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1eedbbb000)
/lib64/ld-linux-x86-64.so.2 (0x00007f1eee396000)
Without info, I can only advise:
env -i git init # rule out environment issues?
# or pave over any installation problem:
sudo apt-get install --reinstall git
However, the prefferable way would be to give more info:
(a) what version of ubuntu
lsb_release -a
(b) what package / repositories
dpkg --status git
// perhaps large:
find /etc/apt -iname '*.list' | xargs cat | grep -v ^# | sort -u
(c) what environment
echo $PATH
echo $LD_LIBRARY_PATH
echo $LD_PRELOAD
file $(which git)
ldd $(which git)
244k31296410
So, I was correct when I thought it had something to do with the Virtual Machine.
It turns out that I was trying to use Git in a shared folder (shared between the VM and the host).
This is where Git was having fits.
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
The week's top questions and answers
Important community announcements
Questions that need answers
By subscribing, you agree to the
Stack Overflow works best with JavaScript enabled相关文章推荐
最近一段时间在linux下用C做一些学习和开发,但是由于经验不足,问题多多。而段错误就是让我非常头痛的一个问题。不过,目前写一个一千行左右的代码,也很少出现段错误,或者是即使出现了,也很容易找出来,并...
使用git时候出现如下问题:
sh: line 1:
815 Segmentation fault: 11
/Applications/Xcode.app/Contents/D...
本人近来热衷于命令行,又听闻大神使用svn终端命令对代码进行提交检出异常方便,于是也想搞一个大神之终端技艺的学习,可是由于先前一直使用GUI软件,对命令知之甚少,前几天进行checkout时又出现一天...
git ---- 版本控制工具。
git是Linus Torvalds为了帮助管理Linux内核开发而开发的一个开放源码的版本控制软件。Torvalds开始着手开发git是为了作为一种过渡方...
转载至:/panfeng412/archive//segmentation-fault-in-linux.html
http://...
段错误(Segmentation fault)Segmentation faultFrom Wikipedia, the free encyclopediaJump to: navigation, s...
Linux环境下段错误的产生原因及调试方法小结
最近在Linux环境下做C语言项目,由于是在一个原有项目基础之上进行二次开发,而且项目工程庞大复杂,出现了不少问题,其中遇到最多、花费时间最长...
ZYBO的视频接口既有VGA又有HDMI,但是这两个接口又有一定的联系,经过yiduan
http://blog.csdn.net/cosmoslhf/article/details/9252509
摘 要:设备树的引入减少了内核为支持新硬件而需要的改变,提高代码重用,加速了Linu...
段错误(以下定义摘自C专家编程)
段错误通常是由于解除引用一个未初始化或非法值的指针引起的。以发生频率为序,最终可能导致段错误的常见编程错误是:
1、坏指针错误:在指针赋值之前就用它来引用内存;或...
他的最新文章
他的热门文章
您举报文章:
举报原因:
原文地址:
原因补充:
(最多只允许输入30个字)技术刘 | 增强现实、图像识别git segmentation fault怎么解决_百度知道
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。
git segmentation fault怎么解决
我有更好的答案
txt这个路径的问题。你去看下这个路径下有342\\Microsoft Visual Studio\&#92段错误(segmentation fault )原因是你f:\\VC++\\MyProjects\&#92
采纳率:92%
来自团队:
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包macos - Git Segmentation fault: 11 - Stack Overflow
Join Stack Overflow to learn, share knowledge, and build your career.
or sign in with
I had to reinstall OS X Lion on my Macbook Pro, and upon trying to use git I got an error stating Segmentation fault: 11.
No matter what git command I try I get that error. I'm just doing this through the Mac terminal. No fancy programs or anything external.
I uninstalled git and just to make sure it was uninstalled I typed git init and it gave me a command not found message.
I reinstalled git and I'm still getting the segmentation fault message. I get the message regardless of what directory I'm in and what command I use.
I got it to work by uninstalling it again and installing 1.8.1 instead of 1.9.2. I guess OS X Lion doesn't like the latest release.
Try setting an email address in your git config if you haven't done so already - traced errors and that's what fixed it for me.
git config --global user.email ""
Working with a Mac OS X Version 10.7.5 (Lion)
Uninstalling Git latest version (2.2.0) and reinstalling
Git version 1.8.4.2 worked for me. Here is the
for git 1.8.4.2
It says snow-leopard but actually works for Lion here is the page with all
3,37511837
I had the same problem, I was using (2.12.2) on Windows 7(x64), I downgraded it to (2.12.1) and now everything is working fine.
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabled

我要回帖

更多关于 segmentation fault 的文章

 

随机推荐