Cygwin Installation Hangs - man-db - cygwin

I am trying to Install Cygwin 64 bit on a Windows 2012R2 (64 bit).
Downloading and initial setup went through but when it reached man-db (/etc/postinstall/man-db) the setup hangs
and remains so forever. I waited more than 1.5 Hours but still no progress.
I checked log file in /var/log/setup.log which has following contents.
Updating index cache for path `/usr/share/man/man1'. Wait...
Processing manual pages under /usr/share/man...
/usr/bin/mandb: warning: /usr/share/man/man1/col.1.gz: whatis parse for col(1) failed
/usr/bin/mandb: warning: /usr/share/man/man1/imv.1 is a dangling symlink
/usr/bin/mandb: iconv_open ("UTF-8//IGNORE", "utf8"): Invalid argument
/usr/bin/mandb: warning: /usr/share/man/man1/mc.1.gz: whatis parse for mc(1) failed
I am not sure if I should cancel and start again. Will this setup come out of this stage with at least some error?
Did anyone install 64 bit Cygwin and got this error ?
Please help

Happens to me often. I was setting up 8 servers this week and it happened to 3 of them. Waited many hours and it is still would not finish. Sometimes the re-installation works, some it does not. So I have resorted to kill the mandb.exe process and that allows the installer to finish normally. So far I have found no side effects of doing so.

After waiting for more than 3 hours, I decided to cancel the setup. Then I tried a reinstall, following the steps exactly as in the first install. I did not add or remove any packages. The already selected packages in the first attempt were recognized as installed. This time, the setup stopped at the above step (man-db) briefly and then completed the installation. No errors. So, re-installation solved my problem.

Late to the party, but —
When mandb.exe hung, I killed its parent bash.exe via Task Manager and the installation completed.
I then killed mandb.exe in Task Manager, since it was still running.
I then opened a Cygwin shell and ran mandb -cds. -c recreates the index, -d prints messages (so you can actually tell it's doing something constructive!) and -s suppresses checking for orphaned formatted manual pages ("stray cats").
As I write this, mandb is still chugging along, three or four hours later, with plenty yet to go.
So I'll remember to file a bug report later :) , I did notice one oddity during the mandb run:
mandb: /usr/share/man/man3/jN.3 is self referencing
mandb: warning: /usr/share/man/man3/jnf.3.gz: bad symlink or ROFF `.so' request

I've been struggling with the same problem today until I realised that moving the main Cygwin setup window revealed a popup complaining about "can't open (null) for reading: no such file"
This happens multiple times in a (re)install

Related

Pop_OS Upgrade Causes Stuff to Break

Alright, just a disclaimer: I've been using some version of Unix or Linux for 30 years, I have good working knowledge, but when it comes to administration I'm enthusiastically dangerous :)
Every time I do the automated OS upgrade in Pop!_OS something bad happens. And I am not talking about apt update / apt dist-upgrade. I do mean going into the settings GUI and in the last item on the list clicking "Upgrade".
Last machine I did it on failed and I couldn't recover the system, not even from a bootable stick. That machine was on it's last leg, I just let it go and built a new box, it was time. Well here we are again, time for an upgrade to 20.10.
I hit "upgrade os" (maybe it's "update os" I don't remember exactly
It did some stuff, and said it needed to restart - Okay so now we're windows? Not thrilled
Restart and end up at a gray screen where it sat at 0% progress bar for the update
I let it sit a good long while, maybe 45 minutes, I was worried this mid-low range machine was just taking a while, nothing
Cringe.. hit the reset button, the system rebooted and did "something" and then came up seemingly okay
Now here's the problem list:
Did the upgrade happen fully, completely, and successfully? How can I tell? This feels like I'm running windows and just rolling in the blind mystery..
VMWare Workstation wont launch. Nothing happens with icon click, from command line I get this error:
/usr/bin/vmware: line 105: 159580 Segmentation fault (core dumped) "$BINDIR"/vmware-modconfig --appname="VMware Workstation" --icon="vmware-workstation"
Searching online a bunch there was a lot of talk that there may be permission problems after upgrade and running it as root would help. This did not work. I read that upgrading to VMWare 16.x will help. I'm open to it, but on principle WHY does this have to be the case?
I use another app that is installed from source, it's called MakeMKV. I've had no trouble with it until the Pop upgrade. Again, it doesn't launch from the icon. I rebuilt and reinstalled it. No go. Launching from command line returns:
/snap/makemkv/217/bin/desktop-launch: line 51: /home/ritchie/.config/user-dirs.dirs: Permission denied
qt.qpa.screen: QXcbConnection: Could not connect to display :1
Could not connect to any X display.
Launching from the command line with sudo worked though! So wtf?
This feels like a key piece of the puzzle, that bit about not being able to connect to the display.
Since this post is so long I wont list the hardware, but am happy to if it helps diagnose.
Any help is appreciated!
got the same with other snap packages...
tried to figure out what's wrong...
looks like some ENV variable is not set properly causing the error:
.config/user-dirs.dirs: Permission denied
but simply reinstalling the package resolves the issue:
sudo snap remove %package%
sudo snap install %package%

Unable to open Instruments after repeatedly seeing (RunLoop::Xcrun::TimeoutError) error

I've posted this issue
but believe I'm now running into a new one. We have automated tests that run every 15 minutes on a Jenkins server. While I'm still seeing the run_loop error listed in the link above, approximately once per hour I'm now seeing the following error in the console's output
Xcrun timed out after 3.64 seconds executing
xcrun instruments -s templates
with a timeout of 30
(RunLoop::Xcrun::TimeoutError)
When I see this and try to open Instruments, it says "Instruments cannot be opened at this time" and the only solution I've found so far is to reboot the server. This is problematic because there are several jobs running on this server at once and rebooting the machine every hour is not ideal. After rebooting the machine, Instruments is able to be opened and the tests run successfully for about another hour.
I can provide any further information necessary, just not sure where to go from here since I don't see much about this issue online.
Edit: My apologies, the missing information is
Xcode: 7.1.1
MacOS: 10.10.5
Calabash-Cucumber: 0.17.0
I have experienced this as well on our Jenkins CI machine running El Cap and Xcode 7.2. The CoreSimulator and instruments environment becomes unstable rather quickly.
Before running your tests, try:
# From Ruby
RunLoop::CoreSimulator.terminate_core_simulator_processes
# From the command line
$ bundle exec run-loop simctl manage-processes

Cygwin error: "-bash: fork: retry: Resource temporarily unavailable"

I recently reinstalled Cygwin on my computer in order to get access to several command line elements that I was missing. I have never had previous difficulty with Cygwin, but after this reinstallation, an error message continues to appear after (almost) each command entered. For instance:
-bash-4.1$ wc m1.txt
3 [main] bash 2216 child_info_fork::abort: data segment start: parent(0x26D000) != child(0x38D000)
-bash: fork: retry: Resource temporarily unavailable
2013930 4027950 74968256 m1.txt
Generally, the command still runs (as seen above), but not always. Occasionally, the 'error' message occurs several times in a row (the initial number "3" will then change to a "4" or "2", notably if I start a second Cygwin window.
Also, as soon as I start up Cygwin, I get the following message before the prompt:
3 [main] bash 6140 child_info_fork::abort: data segment start: parent(0x26D000) != child(0x36D000)
-bash: fork: retry: Resource temporarily unavailable
-bash: fork: Resource temporarily unavailable
-bash-4.1$
At the moment, I am debating whether to uninstall/reinstall Cygwin again or just live with the error messages, but I was curious if there might be an issue that I am unaware of.
(assuming Cygwin is installed at C:\Cygwin):
Open Task Manager and close any processes that look to be Cygwin related.
Open C:\Cygwin\bin in Windows Explorer
Verify that dash.exe, ash.exe, rebase.exe, and rebaseall exist in this folder
If any of them are missing, re-run Cygwin setup and select the dash, ash, and rebase packages
right-click your C:\Cygwin folder, uncheck Read-only (if its checked), and press OK.
When an error about not being able to switch some files comes up, select "Ignore All". Wait for this process to complete.
Browse to C:\Cygwin\bin in Windows Explorer
Right click dash.exe and click "Run as Administrator". A command Prompt should appear with nothing but a $
Type /usr/bin/rebaseall -v, hit enter, and wait for the process to complete.
If you get errors about Cygwin processes running, try Step 1 again. If that still doesn't work, Restart your computer into safe mode and try these steps again.
A commenter noted that, depending on your settings, you may have to type cd /usr/bin && ./rebaseall -v instead.
Try opening Cygwin again.
This process worked for me. I hope it works for you guys too.
Source: http://cygwin.wikia.com/wiki/Rebaseall
I would like to add the following to the above answers, as it is what I had to do after reinstalling Cygwin:
Navigate to the "/usr/bin" directory (usually, C:\cygwin\bin) and right click, Run as Administrator the file: dash.exe
Then, at the $ prompt type the following, hitting enter after each line:
cd /usr/bin/
/usr/bin/peflags * -d 1
/usr/bin/rebaseall -v
What it does is, it marks the dll's as "rebase-able," and then rebases them. You have to have peflags.exe in addition to the above files (in previous answers). You may have to restart windows after doing this and you will definitely need to make sure that there are no processes nor services belonging to cygwin running. (Use task manager, kill any related processes, and then under the services tab look for any service starting with CYG and stop it.)
After doing this, I was able to get cygwin to run without any errors about dll's being loaded to the wrong addresses aka fork errors, etc.
I hope that this helps others, as it was a pain to find.
SOURCE: http://www.cygwin.com/faq.html#faq.using.fixing-fork-failures
and the rebase README file.
To add on to other answers here, we ran into the same issue but could not run the rebase command from the ash or dash shell. However, when launching the command from the Windows cmd shell, the following worked.
cmd /c "C:\cygwin64\bin\ash.exe /usr/rebaseall -v"
-v is to get verbose output
I found another information here :
http://cygwin.com/ml/cygwin/2014-02/msg00531.html
You have to delete the database at
/etc/rebase.db* and do in a "ash" windows :
peflags * -d 1
rebaseall
It works for me on 2 servers.
I solved this problem by restarting my computer. Probably installed a driver update and kept using sleep instead of shutting down.
Experienced the same issue when loading Cygwin with cygiconv-2.dll forking and not loading successfully in the Cygwin terminal, but after turning off my AntiVirus (it was specifically Ad-aware), the issue resolved, and Cygwin worked properly.
In case you are using babun's Cygwin, after rebaseall, try launching Cygwin by executing .babun\cygwin\cygwin.bat in a Windows command prompt or Windows explorer.
This works for me (while launching babun's default console - mintty results in fork error).
I had the error on win10 and i was trying to rebase to c: before install.
then i saw that the installer was installing it instead to c:/Users/myuser
so i was coping all files from c:/Users/myuser to c:.badun
and then restart plus open badun.bat
not shure if this was wise its now duplicated XD... but then it worked again.
Rebaseing didn't help in my case. In addition to what other people suggested, I noticed that reducing the length of PATH environment variable fixed the issue for me (and for other people as well as can be seen from this answer).
This issue is intermittent in nature & I found this issue when there is network is too slow to connect to remote machine on AWS.... I have Shell script that runs through Gitbash shell & it connects to AWS EC2 instance with ssh..... Most of the time, it ran correctly but 2 out 100 times it get into this issue bash: fork: retry: Resource temporarily unavailable .... Killing the MSYS2 terminal from task manager helps to overcome with this issue....
Negative side is you need to run the scripts from the beginning...
I had the same issue on Windows 10 and the mobaxterm app (which uses cygwin) and I tried all of answers listed here however for me, the solution was to simply delete the "CryptoPro CSP" application.
I started facing this problem after upgrading to windows 10. As of now I do not see that any of the above method working.
What I am noticing is that if you start cygwin with admin right (right click and say "run as admin") then it works fine.
Or you open cmd as administrator and then launch cygwin from there, then also it runs fine.
Just reinstall cygwin and select TCL and activate EXPECT

bash.exe - entry point not found

when trying to install cygwin, I keep getting this error message:
the entry point
rl_filename_rewrite_hook could not be
located in the dynamic link library
cygreadline7.dll
Has anyone seen this before ?
Thanks
I had the same error with cygwin1.dll. I checked in c:\cygwin\bin and noticed there were two files, cygwin1.dll and cygwin1.dll.new (possibly from a failed or aborted setup run?). The ".new" version was in fact newer (and slightly larger) than the existing cygwin1.dll, so I replaced cygwin1.dll with cygwin1.dll.new, and ran setup again. It completed with no errors.
First idea is to try reinstalling libreadline7 (or similarly named package) using the cygwin installer. Use the search field to enter readline to make it easier to find the right package.
Another option is that in the cygwin installer, change form Curr to Prev in order to switch to the previous-stable release. This means lots and lots of downloading and reinstalling. I anctually did manage to provoke my error into becoming a libreadline7 error, and switching to Prev at least got rid of the error messages. (Yay! Now bash, ssh server and git is working again! Back to work here then...)
Please check your path in WINDOWS (advanced system properties) environment. I found that C:\WinAVR\bin was coming before my cygwin path, so I moved that to the end, fixed my issue.
If you have multiple CYGWIN1.DLL files in your system, it definitely causes headaches if you're not careful.

NSIS script help-install without killing explorer

When I tried to un-install and install an executable foo.exe, Im geting the below error
Error opening file for writing
click abort to stop the installation
I could find that some files were failed to get deleted while un-installation.
And by using process explorer I can see that explorer.exe has still reference to some dlls of foo.exe even after unregistering them.
and killing the explorer.exe and re-start it again while un-installation solves the issue. (thru NSIS installation script).
or by setting rebook ok flag in script and ask user to re-start his machine before installing foo.exe again.
I don't think its a good solution to ask user to reboot his machine after un-installation .
Can anyone help me on how can I make sure that my installation goes fine instead of restarting explorer.exe
For registered shell extensions there is really no clean way to delete the dll's other than forcing a reboot (Or log-off if they are registered in HKCU\Software\Classes)
If that is not good enough you basically have two options:
Rename the .dll and delete it later
<HACKALERT>Inject a thread that calls CoFreeUnusedLibraries() into every process that has your dll loaded</HACKALERT>
Just killing and restarting explorer is not really an option since you don't know if some other program is also using your shell extension.

Resources