Cygwin postinstall script errors (exit code 254)

0

I'm trying to install cygwin, but I'm getting the following post-install script error:

Package: _/base-files
    base-files-mketc.sh exit code 254
    base-files-profile.sh exit code 254

I can't find any useful information on this through Google. I've found a couple other post-install error discussions that recommend deleting Cygwin and clearing the registry, rebooting, and reinstalling, which I tried with no luck.

Has anyone encountered this and if so, how can it be resolved.

EDIT: Here's the setup log

ewok

Posted 2017-05-12T01:39:55.380

Reputation: 2 743

Before that you have already other issues dash 7004 fork: child 5240 - died waiting for dll loading, errno 11 . Something is interfering with Cywgin. Usually an antivirus https://cygwin.com/faq/faq.html#faq.using.bloda

– matzeri – 2017-05-12T11:00:41.250

@matzeri I disabled my antivirus and am still having the problem – ewok – 2017-05-12T15:18:56.633

@ewok I had this problem and had to uninstall my antivirus (avast). Cygwin then installed correctly. I then reinstalled the antivirus (I haven't tried to add any new packages to Cygwin since). – DavidPostill – 2017-05-15T22:26:46.277

Answers

1

Two steps:

  • disable antivirus
  • disable firewall

If this help, turn on firewall and add all cygwin folders to firewall whitelist.

If not, read this

How do I fix fork() failures?

Unfortunately, Windows does not use the fork/exec model of process creation found in UNIX-like OSes, so it is difficult for Cygwin to implement a reliable and correct fork(), which can lead to error messages such as:

  • unable to remap somedll to same address as parent
  • couldn't allocate heap
  • died waiting for dll loading
  • child -1 - died waiting for longjmp before initialization
  • STATUS_ACCESS_VIOLATION
  • resource temporarily unavailable

Potential solutions for the above errors:

  • Restart whatever process is trying (and failing) to use fork(). Sometimes Windows sets up a process environment that is even more hostile to fork() than usual.
  • Ensure that you have eliminated (not just disabled) all software on the BLODA.
  • Switch from 32-bit Cygwin to 64-bit Cygwin, if your OS and CPU support that. With the bigger address space fork() is less likely to fail.

  • Try setting the environment variable CYGWIN to "detect_bloda", which enables some extra debugging, which may indicate what other software is causing the problem.

    See this mail for more information.

  • Force a full rebase: Run rebase-trigger fullrebase, exit all Cygwin programs and run Cygwin setup.

    By default, Cygwin's setup program automatically performs an incremental rebase of newly installed files. Forcing a full rebase causes the rebase map to be cleared before doing the rebase.

    See /usr/share/doc/rebase/README and /usr/share/doc/Cygwin/_autorebase.README for more details.

    Please note that installing new packages or updating existing ones undoes the effects of rebase and often causes fork() failures to reappear.

    See the process creation section of the User's Guide for the technical reasons it is so difficult to make fork() work reliably.

Tomasz Jakub Rup

Posted 2017-05-12T01:39:55.380

Reputation: 598

I have already followed these steps with no luck. – ewok – 2017-05-15T19:24:59.897

0

Have you tried using other mirrors?

The issue may be related to the mirror. The error code may be related to the ssh termination.

Source: PythonAnywhere Forums

Kronos

Posted 2017-05-12T01:39:55.380

Reputation: 101

I did. Ultimately it turned out to be an unlisted BLODA. I was able to get corporate support to remove it from my laptop and I now have Cygwin working. – ewok – 2017-05-18T19:26:48.673

0

I have stumbled across the same issue the other day when I was trying to install Cygwin on Windows 10.

When researching the problem, I found something about an address mismatch in the setup log (sorry that I don't have the exact wording - I won't reproduce that error ...). That lead me to the idea that it might have something to do with ASLR (a technique to harden the system against malware).

So I turned off ASLR. After doing so, I could install Cygwin without problems.

As said above, this was with Windows 10. But to my best knowledge, Windows 7 also has ASLR, so this could very well be the source of your problems. You can turn it off in Windows via UI if you download EMET, or via registry (see here). So you could try that and see if Cygwin then installs correctly.

Please note that I do not recommend having ASLR turned off; I am considering it as an important malware protection. However, in Windows 10, you can enable ASLR per executable, meaning that you can turn it on system-wide and make exceptions for the Cygwin executables. I am nearly sure that you can achieve the same in Windows 7.

In short, you could

  • turn off ASLR system-wide and install Cygwin

  • turn on ASLR again system-wide

  • if the Cygwin installation did not fail, except the Cygwin executables from ASLR

That last step could mean creating dozens of exceptions, though, but for me, it's worth it.

Binarus

Posted 2017-05-12T01:39:55.380

Reputation: 475