1

A few days ago I had this error message in Git Bash as you can see 1st error message

cygheap

A friend of mine tried to help me by deleting the "cygwin1.dll" file, which apparently made it only worst.

Now I have this error message 2nd error message.

Error

What do you suggest doing now?
I tried to uninstall Cygwin and reinstall it, but it doesn't let me as I have an error message saying cygwin1.dll is missing.

VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755
Yiannis11
  • 11
  • 4
  • shows the DLL's in the `Intel\bin` folder that are starting with Cygwin or MSYS . What is the application you installed there ? Is it your User really called Intel ? – matzeri Feb 16 '22 at 11:10
  • See also about Git Bash misleading error message https://stackoverflow.com/questions/60507083/why-cant-i-fix-the-cygwin1-dll-mismatch-issue/60525817#60525817 – matzeri Feb 16 '22 at 11:12
  • @matzeri Thank you for your answer, yes they start with "cyg" and not with "MSYS" as you mentioned. I checked this misleading error message but I don't think it's applicable in my case as I don't have this "MSYS" anywhere. What do you suggest? – Yiannis11 Feb 16 '22 at 12:00
  • I don't need Cygwin anymore, I just want this error message to disappear from Git Bash, that's all :/ – Yiannis11 Feb 16 '22 at 12:40
  • Git Bash is a customized version of mingw and msys2. Remove your un-needed cygwin install by deleting the install folder, e.g. C:/cygwin64. Re-install the Git Bash product. (Use uninstall/install if necessary.) – Doug Henderson Feb 17 '22 at 17:41
  • I did, the error is still there. – Yiannis11 Feb 18 '22 at 10:27

1 Answers1

0

First, using Git For Windows would come with a functioning bash, 200 Linux commands (including a cut.exe)

You also have the alternative of WSL2, which comes with a full-fledge Linux distro of your choosing, and Git (for Linux) on it.

Regarding your original error ("cygheap base mismatch detected"), I recommended in the past having a simplified PATH with the minimum you need.

VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755
  • Thank you very much for your answer. I downloaded Cygwin as it was instructed like that in the courses I am taking. Now I am completely stuck. What would you recommend to do now? Download this .dll file separately? I cannot even reinstall Cygwin to install this .dll file :/ – Yiannis11 Feb 16 '22 at 08:14
  • @Yiannis11 I don't know the specifics of your course, but Cygwin should not be a requirement. Removing it, and using Git For Windows, with the appropriate PATH (as in here: https://stackoverflow.com/a/67565707/6309) should be enough. – VonC Feb 16 '22 at 08:24
  • Actually I uninstalled it completely and cannot even install it now, whenever I try to install Cygwin I have an error message saying this file is missing. – Yiannis11 Feb 16 '22 at 08:25
  • @Yiannis11 Indeed. I haven't used/need Cygwin for years. Let me know how Git for Windows is working for you. Which Windows are you using (type `winver`) – VonC Feb 16 '22 at 08:26
  • I have already installed Git, the issue is that now something happened and whenever I try to type something in Git Bash I have this error message all the time. (C:/Users/Intel/bin/cut.exe: error while loading shared libraries: cygwin1.dll: cannot open shared object file: No such file or directory). Maybe I am missing something or do not understand, I started not longtime ago learning. I have Windows 10, Version 2004 – Yiannis11 Feb 16 '22 at 08:31
  • @Yiannis11 That is why I recommend setting the PATH in a CMD, for testing.: https://stackoverflow.com/a/67565707/6309 – VonC Feb 16 '22 at 08:40
  • Perfect, I'll try right now and tell you, thanks! – Yiannis11 Feb 16 '22 at 08:43
  • I followed exactly what you wrote there. Still the same thing in Git Bash. From what I read online Git Bash and Git CMD are the same things but one is for Windows and one for Linux. I don't know why the course made me download Cygwin and it says to use Git Bash. As it seems I will not be able to solve this issue, I don't know what's happening so maybe I'll use Git CMD :/ – Yiannis11 Feb 16 '22 at 08:48
  • @Yiannis11 Yes, Git CMD should be enough in your case. – VonC Feb 16 '22 at 08:49
  • "ls" command doesn't exist so I can't follow the course along exactly but I'll try to find the appropriate ones for Windows. Thanks a lot for your help! – Yiannis11 Feb 16 '22 at 08:53
  • @Yiannis11 There are 200 `.exe` Linux commands, including `ls`, that you can type right from your CMD (no need for bash). I can type `ls -alrth|wc` without any issue on my CMD. With the `%PATH%` I mention in https://stackoverflow.com/a/67565707/6309, you are good to go. – VonC Feb 16 '22 at 13:11
  • I followed this exactly step by step but it didn't work, what can I say ‍♂️ – Yiannis11 Feb 16 '22 at 13:32
  • @Yiannis11 Can you type `set PA`, and copy here the result? I am interested in your `%PATH%` as set in your CMD after following the steps. – VonC Feb 16 '22 at 13:33
  • Sure! First of all when I type "set GIT" as mentioned in the instructions I get "Environment variable GIT not defined". The result when I typed "set PA" after all the steps as you said: Path=C:\path\to\git\bin;C:\path\to\git\usr\bin;C:\path\to\git\mingw64\bin;C:\path\to\git\mingw64\libexec\git-core;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\ PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC – Yiannis11 Feb 16 '22 at 13:41
  • @Yiannis11 And, of course, you have replaced `path\to\git` by the actual "path to Git", right? Like `C:\Program Files\Git`. – VonC Feb 16 '22 at 13:53
  • No, but now I did it. Path=C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\mingw64\libexec\git-core;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\ PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC – Yiannis11 Feb 16 '22 at 13:58
  • It didn't change anything, still I have "Environment variable GIT not defined" – Yiannis11 Feb 16 '22 at 13:59
  • The idea of the three commands in https://stackoverflow.com/a/67565707/6309 is to adapt GH to your actual Git path, for instance set `set "GH=C:\Program files\Git"` (note the double quotes `"`), and then the third line will work. – VonC Feb 16 '22 at 14:02
  • Thank you very much for your help but I solved this issue by following a colleague's advice to simply install Ubuntu terminal, no need to use Git Bash or anything like that, everything works there without any errors. – Yiannis11 Feb 16 '22 at 14:31
  • @Yian That is indeed what I mention in my answer:WSL2 – VonC Feb 16 '22 at 14:35
  • Thank you again! – Yiannis11 Feb 16 '22 at 14:42
  • Je t'ai envoyé un e-mail auj, si tu pourrais le lire – Yiannis11 May 04 '22 at 03:02