alessivs/supermemo-wine

/usr/bin/winetricks: 7: ./supermemo17.verb: Syntax error: newline unexpected

Closed this issue · 4 comments

eqjjh commented

Desktop Linux Mint 19

Name of checkout or release of supermemo-wine used

?

Output of uname -rom

4.15.0-99-generic x86_64 GNU/Linux

Output of wine --version

[wine-3.6 (Ubuntu 3.6-1)]

Output of winetricks --version

[20180217 - sha256sum: 1b156c616174f41df79d72a90c52eb2b110c63a6e8ecb865d303a8f9f0908924]

Problem Description

[I first got the same error message in a closed issue:
sh: Can't open winetricks

I changed the command to
env WINEARCH=win32 sh /usr/bin/winetricks arch=32 prefix=supermemo17

and then got output:

"wine cmd.exe /c echo '%ProgramFiles%' returned empty string, error message "wine: WINEARCH set to win32 but '/home/user/.wine' is a 64-bit installation.""

sh /usr/bin/winetricks prefix=supermemo17 supermemo17.verb

Output:
You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
Using winetricks 20180217 - sha256sum: 1b156c616174f41df79d72a90c52eb2b110c63a6e8ecb865d303a8f9f0908924 with wine-3.6 (Ubuntu 3.6-1) and WINEARCH=win64
You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
/usr/bin/winetricks: 7: ./supermemo17.verb: Syntax error: newline unexpected]

Installation process stopped with the above error.

You're using an old Winetricks and ancient Wine. That Winetricks not working as expected is quite telling in that it's using the system default prefix ($HOME/.wine) instead of the intended one (from the command line it should be typically $HOME/.local/share/wineprefixes/supermemo17).

Please grab the very latest winetricks, for which you may have to add a PPA if one isn't available in your repository, or simply download by:

wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks

Please also upgrade Wine to at least 4.2.

Alternatively, please allow until August so I can provide a new two-clicks-to-install solution.

eqjjh commented

Got the same error message after updating to newest versions of wine and winetricks. But I think the error may be related to winetricks, as this time the command winetricks --version did not work and said it could not be found in a particular directory, although it was supposed to be installed globally.
Anyway I am going to try installing this in a different OS and will see if it works.

Clearly your shell cannot find the winetricks executable. It could be the case you need to add the folder to your path, or need to specify the path to winetricks along with the running command. In Debian derivatives it is sometimes the case the installed Wine or Winetricks package is designed to coexist along with another default package of the same name; in this case the folders are not added to the path. I don't know how Ubuntu handles this specifically.

From Winetricks README:

Note: packaged Debian / Ubuntu winetricks versions are typically outdated, so a manual installation is recommended.

Rather than the whole incantation listed, since Winetricks is a standalone script, I just recommend to download it manually, to then put it somewhere in your path, or run from the same directory.

wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks
WINEARCH=win32 WINEPREFIX=[...] sh ./winetricks supermemo17.verb
eqjjh commented

I am going to try to install this on a different linux version so I think this issue can be closed.