Exit code 127 in cygwin64

Tim Parenti

After years without problems, suddenly several programs in my installation of cygwin64 on 64-bit Windows 7 Professional are failing to run, and instead appear to exit immediately with code 127, which usually means "command not found" in Bash. In particular, programs like vim, emacs, and even clear exhibit this behavior, while others like vi, echo, touch, and date seem to operate normally.

At first, I figured something might have gone wrong with a previous round of package updates, so I ran another update using cygwin setup's command-line interface, but it didn't seem to help.

From what I can tell, the affected programs don't work at all. Not even --version flags to the program work, which makes me think that there may be something wrong with cygwin itself or a common dependency:

$ vim --version
$ echo $?
127

(I can provide specific version numbers for various packages if it will help, but since this problem existed both before and after the most recent updates, I doubt it matters much.)

I double-checked my PATH variable, and it begins with /usr/local/bin:/usr/bin:, as expected. Is there perhaps some new dependency in these programs that isn't being properly resolved by cygwin's package manager or which may not have been automatically added to my PATH?

Am I missing something else obvious?

Tim Parenti

It looks like clear was the culprit. I diagnosed this by trying to run it with its full path:

$ /usr/bin/clear
$ echo $?
127

I then looked inside /usr/bin and found that clear was somehow missing altogether. So, using cygwin's GUI setup, I forced a fresh reinstall of ncurses, the package which contains clear, and everything seems to be in working order now.

It stands to reason that vim and emacs both make use of clear, hence the problems cascaded to those programs, too.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

127 Return code from $?

Trying to run Docker resulted in exit code 127

supervisord always returns exit status 127 at WebFaction

Eclipse exits automatically exit code 127

React native error - react-native-xcode.sh: line 45: react-native: command not found Command /bin/sh failed with exit code 127

Running Python from CLion gives "Processed finished with exit code 127"

Travis failed with status code 127

Docker compose containers fail and exit with code 127 missing /bin/env bash

Python - CalledProcessError: Command '[...]' returned non-zero exit status 127

Packer Script exited with non-zero exit status : 127

exit code 127 and ': No such file or directory`

Laravel Task schedule with python script "Exit Code: 127(Command not found)"

Setting up VS Code for C using Cygwin64 Compiler and Debugger on Windows

docker's service exit with code 'Exit 127' : The system cannot find the path specified

CLion says 'Process finished with exit code 127'

cygwin64 :: ./configure returns "configure: exit 77"

Cygwin Installation: Package: bash; bash.sh exit code 1

ping command always returns zero exit code in cygwin

Eclipse JVM Exit Code 127 when RTC 'Jazz Administration' perspective was opened

Cygwin postinstall script errors (exit code 254)

Systemd start script fails with exit code 127

dpkg: error exit status 127

aapt finished with non zero exit value 127

grub-efi-amd64-signed package post-installation script subprocess returned error exit status 127

CircleCI 2.0 - exit code 127, bundle command not found

AWS Code Pipeline Error: Script at specified location: scripts/install_dependencies run as user oracle failed with exit code 127

Errors form my k8s CornJob: Pod errors: Error with exit code 127

why Spring tool suite IDE shows error message as "JVM terminated. Exit code=127"

ESP-IDF Github Actions: docker: command not found Error: Process completed with exit code 127

TOP Ranking

  1. 1

    Failed to listen on localhost:8000 (reason: Cannot assign requested address)

  2. 2

    pump.io port in URL

  3. 3

    How to import an asset in swift using Bundle.main.path() in a react-native native module

  4. 4

    Loopback Error: connect ECONNREFUSED 127.0.0.1:3306 (MAMP)

  5. 5

    Compiler error CS0246 (type or namespace not found) on using Ninject in ASP.NET vNext

  6. 6

    BigQuery - concatenate ignoring NULL

  7. 7

    Spring Boot JPA PostgreSQL Web App - Internal Authentication Error

  8. 8

    ggplotly no applicable method for 'plotly_build' applied to an object of class "NULL" if statements

  9. 9

    ngClass error (Can't bind ngClass since it isn't a known property of div) in Angular 11.0.3

  10. 10

    How to remove the extra space from right in a webview?

  11. 11

    Change dd-mm-yyyy date format of dataframe date column to yyyy-mm-dd

  12. 12

    Jquery different data trapped from direct mousedown event and simulation via $(this).trigger('mousedown');

  13. 13

    maven-jaxb2-plugin cannot generate classes due to two declarations cause a collision in ObjectFactory class

  14. 14

    java.lang.NullPointerException: Cannot read the array length because "<local3>" is null

  15. 15

    How to use merge windows unallocated space into Ubuntu using GParted?

  16. 16

    flutter: dropdown item programmatically unselect problem

  17. 17

    Pandas - check if dataframe has negative value in any column

  18. 18

    Nuget add packages gives access denied errors

  19. 19

    Can't pre-populate phone number and message body in SMS link on iPhones when SMS app is not running in the background

  20. 20

    Generate random UUIDv4 with Elm

  21. 21

    Client secret not provided in request error with Keycloak

HotTag

Archive