[Solved] [HELP] Need expert help getting ping to work under wine on Ubuntu 16.04

Hi,

I need help getting ping to work under wine on Ubuntu 16.04. I am trying to run a Battlefield Bad Company 2 server for testing (I might be doing some development on a mod at some point) and I am unable to get it to a playable state. I can run mase_bc2 and Frost.Game.Main_Win32_Final.exe and even connect to the LAN server in game - but, when loading a map, it does not continue loading and instead the game freezes.

Here is the error that I need to solve to get the server playable: 0049:err:winediag:IcmpCreateFile Failed to use ICMP (network ping), this requires special permissions.

When I do wine cmd and then ping I simply get this:
Z:\home\user> ping google.com
0075:fixme:ping:main this command currently just sleeps based on -n parameter

Here is what I have tried:

sudo chmod 4755 /bin/ping to allow wine to access ping. This did not help.

I then tried this:
sudo setcap cap_net_raw+epi "$(readlink -f "/usr/bin/wine")"

which results in this error:
wine: error while loading shared libraries: libwine.so.1: cannot open shared object file: No such file or directory

and then separately after running sudo setcap -r "$(readlink -f "/usr/bin/wine")" to remove the shared libraries error, I also ran this:
sudo setcap 'cap_net_bind_service=+ep' "$(readlink -f "/usr/bin/wine-preloader")"

Both setcap commands result in the same shared libraries error.

I’m decent at Linux but it seems this is beyond my level and I need help with this. I have searched thread after thread online and I came up empty. If someone can solve this for me, this may be one of the only sources of fixing this issue (bug??) on the Internet.

I see there is someone else having this issue here: https://forum.winehq.org/viewtopic.php?f=8&t=30704 and he even gets the same error as me after using setcap however he did not get this issue solved.

UPDATE Sep 7 2018: creating a symlink at /usr/lib/libwine.so.1 removes the shared libraries error, but I am still unable to ping via wine.

UPDATE Sep 8 2018: This seems to be a known bug and is fixed in Wine Development 3.15: https://bugs.winehq.org/show_bug.cgi?id=43252

Thanks.

I am going to say that you need to setup a symlink to point libwine.so.1 to the correct shared object.

1 Like

The system utilities should be installed in the base wine package.

I found this:

https://wiki.winehq.org/Cmd

So if CMD is there then the ping command should be there too. Open it up and try it out. If it is stripped from your install then that would explain why it errors out.

So the symlink actually did do the trick for removing that error but unfortunately, ping still does not work properly and still does not let me ping anything - it’s like it ignored the setcap command altogether because it still says the same thing:

Z:\home\user> ping google.com
0075:fixme:ping:main this command currently just sleeps based on -n parameter

UPDATE Sep 8 2018: This seems to be a known bug and is fixed in Wine Development 3.15: https://bugs.winehq.org/show_bug.cgi?id=43252

1 Like