Adobe Digital Editions 2 on Wine Devel can not reach network

Questions about Wine on Linux
Post Reply
WallE
Level 1
Level 1
Posts: 6
Joined: Fri Apr 24, 2020 3:12 pm

Adobe Digital Editions 2 on Wine Devel can not reach network

Post by WallE » Fri Apr 24, 2020 5:23 pm

Adobe Digital Editions 2 on Wine Devel can not reach network
----------

Hi all,

I'm probably one more guy asking about it, but it seems crazy how hard it is for linux users to be able to read ebooks they purchased. After days of fiddling, my ebook is now worth a couple a bucks more.

I've seen very numerous forum posts about it, on askubuntu and co. After what I have read and tried, I'm about to give up, so this is a last attempt, thanks for your help.

In short, I tried 3 setups for Adobe Digital Editions 2.0:
  1. WineHQ-stable -> The install completes, but ADE crashes.
  2. WineHQ-devel -> but can't reach network. Probably related, ping does not work.
  3. WineHQ-staging -> install crashes (some memory error).
I'll start with my installation process from scratch; I number the problems below.

Code: Select all

## 0. Setup Wine (xUbuntu18.04)
# 0.1. Add the FAaudio dependency:
# 0.2. WineHQ from PPA:
# Install the PPA key
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
sudo apt update
sudo apt install winehq-devel wine32-development-preloader winetricks
This gives me wine v5.6.

Code: Select all

## 1. Create the wine environment

# WINEARCH=win32 is necessary for .NET 3.5 and ADE 2.0
WINEARCH=win32 WINEPREFIX=$HOME/.wine32_dotnet35 winecfg
# install wine-mono: Cancel (We want .NET from microsoft TM)
# install wine-gecko: Ok
Just note here, automatic download for gecko fail. So I had to manually download it and put it into:

Code: Select all

~/.cache/wine
.

Code: Select all

## 2. windowscodecs is listed in some places as required

WINEPREFIX=$HOME/.wine32_dotnet35 winetricks windowscodecs
# --> this will fail, but you can finish it:
# Open the .exe with the archive manager:
engrampa ~/.cache/winetricks/windowscodecs/wic_x86_enu.exe
# Extract windowscodecs.dll and windowscodecsext.dll to: ~/.wine32_dotnet35/drive_c/windows/system32/
# But then wine logs output: 000d:err:menubuilder:convert_to_native_icon error 0x88982F04 committing encoder
So Pb #1, I am not sure that my windowscodecs install is correct. Some guy on archlinux forums stated they solved the install by changing drive permissions, but didn't give detailed steps.

Code: Select all

## 3. Install .NET framework 3.5 Service Pack 1

WINEPREFIX=$HOME/.wine32_dotnet35 winetricks dotnet35sp1
# -> Fails on 64 bits installation!
# -> Will also install (automatically):
#    .NET 2.0, .NET 2.0 SP1, .NET 2.0 SP2,
#    XPS essentials pack,
#    .NET 3.0, .NET 3.0 SP1,
#    .NET 3.5

## Install Adobe Digital Editions

# Preferably version 2.0
WINEPREFIX=$HOME/.wine32_dotnet35 wine ~/Downloads/ADE_2.0_Installer.exe
With wine-devel 5.6, ADE2 launches succesfully, but can't connect to servers (necessary to unlock my DRMs).

So here start the rabbit holes: I thought I would check connectivity using ping:

Code: Select all

WINEPREFIX=$HOME/.wine32_dotnet35 wine cmd
and ping 8.8.8.8. -> Stumble on the ICMP permission error, try the solution from these forums:

Code: Select all

sudo setcap cap_net_raw+epi /opt/wine-devel/bin/wine-preloader
Note that the path to the preloader for winehq-devel is not stated on the forum, so I had to guess.

But now I fail even worse because wine cmd won't even start (Pb. #2):

Code: Select all

/opt/wine-devel/bin/wine: error while loading shared libraries: libwine.so.1: cannot open shared object file: No such file or directory
Accordingly, I looked for the packages containing such file:

Code: Select all

apt-file search libwine.so.1
#libwine: /usr/lib/x86_64-linux-gnu/wine/libwine.so.1
#libwine: /usr/lib/x86_64-linux-gnu/wine/libwine.so.1.0
#libwine-development: /usr/lib/x86_64-linux-gnu/wine-development/libwine.so.1
#libwine-development: /usr/lib/x86_64-linux-gnu/wine-development/libwine.so.1.0
So I installed libwine-development, but it says "version 3.6" instead of 5.6, and what's more the problem remains the same.

In summary, if you could help me solve these 3 problems, I would be very grateful:
1. Telling me where to get this libwine, or which preloader to authorize, so that ping works;
2. Or telling me how to get network connectivity from ADE2;
3. Optionally telling me if windowscodecs is required, and how to install it properly.

I tried those steps for WineHQ-stable and -staging as well, after changing my install:

Code: Select all

sudo apt purge winehq-devel  # this uninstalls winetricks
sudo apt install winehq-staging winetricks
I can post the detailed wine-staging error in a separate post.

Thanks a lot!!

jkfloris
Level 7
Level 7
Posts: 921
Joined: Thu Aug 14, 2014 10:10 am

Re: Adobe Digital Editions 2 on Wine Devel can not reach network

Post by jkfloris » Sat Apr 25, 2020 2:56 am

Code: Select all

sudo apt install winehq-devel wine32-development-preloader winetricks
You are mixing two Wine versions. The wine32-development-preloader package is part of the Ubuntu Wine version.
You should be able to install Wine devel with:

Code: Select all

sudo apt install --install-recommends winehq-devel

WallE
Level 1
Level 1
Posts: 6
Joined: Fri Apr 24, 2020 3:12 pm

Re: Adobe Digital Editions 2 on Wine Devel can not reach network

Post by WallE » Sat Apr 25, 2020 4:44 am

You are mixing two Wine versions. The wine32-development-preloader package is part of the Ubuntu Wine version.
You should be able to install Wine devel with:

Code: Select all

sudo apt install --install-recommends winehq-devel
Thank you. However I did

Code: Select all

sudo apt install --dry-run --install-recommends --reinstall winehq-devel
and the packages installed are 1) identical to without --install-recommends, 2) already installed on my system...

However I see that the repositories now have Wine-5.7, I'll try my luck anyway.

WallE
Level 1
Level 1
Posts: 6
Joined: Fri Apr 24, 2020 3:12 pm

Re: Adobe Digital Editions 2 on Wine Devel can not reach network

Post by WallE » Sat Apr 25, 2020 5:01 am

Also, I retried the setcap command with wine-5.7, then on a new 32bit prefix, with gecko and *without* mono or .NET, there is still this libwine.so.1 missing.

jkfloris
Level 7
Level 7
Posts: 921
Joined: Thu Aug 14, 2014 10:10 am

Re: Adobe Digital Editions 2 on Wine Devel can not reach network

Post by jkfloris » Sat Apr 25, 2020 1:56 pm

libwine.so.1 is part of wine-devel-i386:i386 and wine-devel-amd64

Can you confirm the following?

Code: Select all

ldd /opt/wine-devel/bin/wine
	linux-gate.so.1 (0xf7f67000)
	libwine.so.1 => /opt/wine-devel/bin/../lib/libwine.so.1 (0xf7ddb000)
	libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7d8b000)
	libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7ba7000)
	libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7ba1000)
	/lib/ld-linux.so.2 (0xf7f68000)

dpkg -S /opt/wine-devel/lib/libwine.so.1
	wine-devel-i386:i386: /opt/wine-devel/lib/libwine.so.1

ldd /opt/wine-devel/bin/wine64
	linux-vdso.so.1 (0x00007ffcc4920000)
	libwine.so.1 => /opt/wine-devel/bin/../lib64/libwine.so.1 (0x00007fbbd12c3000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbbd1274000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbbd10b1000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fbbd10ac000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fbbd143c000)

dpkg -S /opt/wine-devel/lib64/libwine.so.1
	wine-devel-amd64: /opt/wine-devel/lib64/libwine.so.1

WallE
Level 1
Level 1
Posts: 6
Joined: Fri Apr 24, 2020 3:12 pm

Re: Adobe Digital Editions 2 on Wine Devel can not reach network

Post by WallE » Sun Apr 26, 2020 5:46 am

Thanks for the hint, I get the same as you:

Code: Select all

ldd /opt/wine-devel/bin/wine
	linux-gate.so.1 (0xf7f40000)
	libwine.so.1 => /opt/wine-devel/bin/../lib/libwine.so.1 (0xf7db3000)
	libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7d6f000)
	libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7b93000)
	libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7b8e000)
	/lib/ld-linux.so.2 (0xf7f41000)

dpkg -S /opt/wine-devel/lib/libwine.so.1
wine-devel-i386:i386: /opt/wine-devel/lib/libwine.so.1
However, I there's a problem with the wine symlink:

Code: Select all

ls -lhF $(which wine)
lrwxrwxrwx 1 root root 24 avril 25 02:21 /usr/bin/wine -> /opt/wine-devel/bin/wine*

ldd $(which wine)
        linux-gate.so.1 (0xf7ed6000)
	libwine.so.1 => not found
	libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7e8d000)
	libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7cb1000)
	/lib/ld-linux.so.2 (0xf7ed7000)
So I tried to run with the real path instead, but still get the error:

Code: Select all

WINEPREFIX=$HOME/.wine32_dotnet35 /opt/wine-devel/bin/wine cmd
/opt/wine-devel/bin/wine: error while loading shared libraries: libwine.so.1: cannot open shared object file: No such file or directory
Then I naively tried to symlink libwine.so.1 in /usr/lib/ and ping works!!

Code: Select all

cd /usr/lib
sudo ln -s /opt/wine-devel/lib/libwine.so.1
Gotta check if ADE connects to Adobe servers now...

WallE
Level 1
Level 1
Posts: 6
Joined: Fri Apr 24, 2020 3:12 pm

Re: Adobe Digital Editions 2 on Wine Devel can not reach network

Post by WallE » Sun Apr 26, 2020 6:22 am

Failure to get ADE2 to connect.

The console is very verbose, and keeps logging until I kill wineserver. Shall I post those logs here, they may help?

For the record, my current wine prefix does not have the windowscodecs from winetricks. I tried to install it at this stage, but it crashes with a window "A program on your system has crashed, but WineDbg was unable to attach to the process to obtain a backtrace"...

Wouldn't I benefit from a more up-to-date version of winetricks too?

jkfloris
Level 7
Level 7
Posts: 921
Joined: Thu Aug 14, 2014 10:10 am

Re: Adobe Digital Editions 2 on Wine Devel can not reach network

Post by jkfloris » Sun Apr 26, 2020 10:19 am

Wouldn't I benefit from a more up-to-date version of winetricks too?
Probably. If your older winetricks version is new enough, you can upgrade with:

Code: Select all

sudo winetricks --self-update
Newer versions of Winetricks install dotnet35sp1 without installing other versions of .Net.

WallE
Level 1
Level 1
Posts: 6
Joined: Fri Apr 24, 2020 3:12 pm

Re: Adobe Digital Editions 2 on Wine Devel can not reach network

Post by WallE » Sun May 17, 2020 7:03 am

With the self-updated winetricks (20200412-next), the dotnet35sp1 installer fails. I suspect all of this comes from a very upstream problem with wine and network: for example, winecfg is unable to download "Mono" (although now, ping works).

Post Reply