failed to run '/usr/bin/bash': no such file or directory - windows

I've been using gitbash these past few days and it's working just fine. But a while ago, after install a pdf reader with patch file, when I opened my gitbash it gave me the error which says "Failed to run '/usr/bin/bash': No such file or directory". I don't know what happened and why, but I think the patch file of the application that I installed has something to do with it. My pc antivirus prompted a warning, and I took actions. Then the trouble in the gitbash happened. Please help me, I don't want to reinstall gitbash again coz I also have to install some things.

Had the same issue, searched for it, this is one of the first few results. So if you are looking why you got this message recently: check your antivirus and that the folder and the file actually exist. As previous answers mentioned, reinstall helps bring it back, but antivirus might break it again. So I would check your antivirus GUI and see if you can restore it and add an exception.
Mine was that Avast antivirus classified it as 'IDP.Generic' threat (weirdly only when I would close the shell with ctrl+c or ctrl+d on Windows 10).

to resolve this issue simply reinstall git.

I disabled Avast antivirus software
Then uninstalled and reinstalled git
It worked for me:)

Like jack this was caused by my virus scanner(avast). To resolve I opened the quarantine page restored and added exemption.

Try 'echo $PATH' in CygWin Terminal to get the PATH it must written something like
/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program
Files/TortoiseHg:/home
Depending on the Chroot in you sshd_config it looks for the /bin/bash file
you will have three options
you might have to copy the files into the Chroot mentioned folder and give the permission.
You can update with you Chroot
Or bind mounting would also help
ref

To resolve this issue simply deactivate your antivirus while reinstalling git.

Related

How do i execute solana-test-validator command properly?

When i try to execute "solana-test-validator" command in my terminal, i get error and it says:
"libcrypto1_1-x64.dll not found"
"libssl-1_1-x64.dll not found"
I searched everywhere and i looked every solana-test-validator related error things but i never be able to solve my problem.
Here is how I solved it. The solution is in the problem. It needs those two DLL files. Therefore, find a correct version of the both the DLL over the internet and paste in the solana active-release path or if you have zoom installed, you can copy the DLLs from there.
Zoom Location - C:\Users\Asus\AppData\Roaming\Zoom\bin
Solana Active release - C:\Users\Asus\.local\share\solana\install\active_release\bin
Once you copy paste the DLLs, just start the CMD as an admin and run
solana-test-validator
I solved my problem by reinstalling the Ubuntu terminal.

CLION: WSL not found, ssh connected?

Today I got this error message:
"WSL not found at: C:\Users\Nick\AppData\Local\Microsoft\WindowsApps\debian.exe"
Before this message today, everything worked fine (I start Debian through start menu, restart the ssh service, then start CLion and it linked up just fine.).
The executable is there, just 0kb. The strange thing is that the Linux environment can be opened from windows as always (debian), I can ssh into it just fine (looks like CLion can as well, see picture).
This happened after an update tot CLion 2018.2.2 from 2018.2.1. Rolling back did not fix the issue.
What could be going wrong here?
I've found a fix for the issue. In Windows config select the apps list, find Debian and press advanced settings. Then end the service and recover it (the mild recovery was enough for my case). Although I'm not certain it aided in fixing the issue I've also removed the Jetbrains folder in the LocalCache/Local folder of the Debian folder in my AppData\Local\Packages.

Git: fatal: fsync error on 'sha1 file': Bad file descriptor

I'm using VS Code with Git - it's in portable location C:\_DEV\bin\git and is also added to Windows PATH so it works just fine with no remotes.
I have a OneDrive _GIT folder where I have some of my "remote" repositories, that sync between 2 devices (sometimes, I have it there mainly for backup purposes).
The error appears when I want to commit changes, only way to "fix" this issue is to restart the computer, so I'd like to find a way how to fix it properly. The problem is, it doesn't appear always and not for all repositories, it's pretty random.
I think it's because of sync from/to OneDrive. Is there a command I can run to fix the file descriptor? Or other way to prevent it?
git remote --verbose
git ls-tree -l HEAD -- a:\new\theme\assets\sass\main.scss
git show 97a333c5e7fce816dbb46a5c1235d69e61836726
git show HEAD:theme/assets/sass/main.scss
git add -A -- a:\new\theme\assets\sass\main.scss
fatal: fsync error on 'sha1 file': Bad file descriptor
Thanks to #edward-thomson.
I had same problem on my PC, where i mapped a folder under my homedrive to E:
C:\Users\myuserid\E-Folder\SomeGitProject
by sharing the folder, so i could shortcut it to
E:\SomeGitProject
Solution was to use the full path in CMD or use the shortcut to homedrive from git bash:
~/E-Folder/SomeGitProject
I guess your A: likewise is a share, that you can access with a full path probably also located somewhere under your homedrive.
I am posting late to help others get to the solution faster than I did. The actual culprit was elusive, and I tried everything from re-installing GIT to creating new repositories.
This happened to me in windows and it was due to a change in permissions in a parent folder somewhere.
The solution was to simply disconnect and remap the folder.
I have had this error a lot recently, and the above answers helped, but another thing that also seems to cause it is VS itself running.
Try closing VS, then doing a "Git Bash Here" from Explorer and using the command line only.
Once done you can then reopen VS.
I also have mapped my root webspace as a drive.
This is no problem until files are watched (like with npm run watch).
I faced same issue. I just resolved this issue with the following steps:
1- Close Visual Code
2- Open project on git bash command line
3- Commit the code again
I had the same problem with visual studio 2017. My solution was to close visual studio, then open Visual studio CODE and merge the files there.
Restarting VS Code works. A bit easier than disconnecting and re-mapping the folder (which also works).
I just had the same problem. In my case the problem was low disk space. Hope this helps someone.

"bsdtar.EXE: Error opening archive: Unrecognized archive format" while running vagrant up

I am taking a course on Udacity that requires me to set up a virtual machine on my system. I have already downloaded and installed Virtual Box and Vagrant. When I try to run the command vagrant up, I get this error:
Could anyone please explain what might be going wrong?
I am working on my office laptop so I cannot change the firewall settings. They are controlled by McAfee. Also, the firewall has been turned off by McAfee to the best of my knowledge. I tried searching a lot but couldn't come up with a solution to this.
Well, I researched more about this and was finally able to find something. This issue comes up when vagrant doesn't have folder permission. Sometimes Cygwin shell in Windows doesn't get permission to write or create a new folder.
I followed their github issue. This is what made it work for me:
Rename C:\HashiCorp\Vagrant\embedded\gnuwin32\bin\bsdtar.exe to
something like bsdtar_backup.exe (or temporarily move it)
In that same directory, create bsdtar.bat with this content:
#ECHO OFF
"%~dp0....\mingw\bin\bsdtar.exe" %*
This will result in Vagrant using the mingw binary, without you having to dive into some code. After these two steps, try adding a box.

get vim working in mobaxterm

I have installed gvim and vim in mobaxterm 8 (using apt-get and mobapt respectively), and can't get either to work. nano works fine.
When I run the program, the cursor moves to a new line in the terminal but nothing happens.
I have also tried creating a .vimrc. Does anyone have any ideas? Thanks.
I installed the latest version of MobaXterm as up today which is 9.1 (http://mobaxterm.mobatek.net/download-home-edition.html) and the list of bug fixes includes the freezing problem you are are talking about. It works for me now and I no longer see that issue. The only thing is that after the installation is completed you need to download the CygUtils plugin and copy it to the same folder where the MobaXterm executable is located and then restart the application. It seems overall more stable now. Hope that helps.
I am using V9.4 which already has the vim. To configure the environment for your vim you may creat a .vimrc file in your home directory (go to the directory using cd command only).

Resources