[Howto] Install Wine (and other debs) using Local Repository

Archived topics about LMDE 1 and LMDE 2
chinoto

[Howto] Install Wine (and other debs) using Local Repository

Post by chinoto »

READ: I am dumb :shock:
This is still useful if the package(s) you want are not part of an apt repository, but otherwise, I recommend this: http://forums.linuxmint.com/viewtopic.p ... 7&t=101123

This was done with the aim of installing Wine, but will also work for any other deb that you would download, such as Skype or Google Chrome, without going through dependency hell (unless none of your sources have the required dependency...).

I installed LMDE, did the huge update, and switched to the Cinnamon shell (2012/04/10). Everything seemed to work well and I had no qualms about using cinnamon instead of Gnome2, so the next day I decided I wanted to get Wine... Turns out that's a hard thing to find in Debian (Doesn't exist in repo and the instructions I've seen link to old packages or don't work well). So after poking around for awhile trying to find seamless solutions, I came up with an idea: create a local repository so package management can figure out dependencies. Here's how to do it.

===Installing Wine using a Local Repository===
1. In your Downloads folder create a folder called local_repo, the full path of which should be /home/username/Downloads/local_repo (Shorthanded as $repo) (if the path has any spaces it will break, but might be correctable with "\"s later)
2. Grab latest debs of wine and wine-gecko for your arch from http://main.mepis-deb.org/mepiscr/repo/pool/main/w/ OR http://main.mepis-deb.org/mepiscr/testrepo/pool/test/w/ (Wine 1.4 OR 1.5) and put them in $repo
3. Go to your $repo directory and create a file called "scan.sh" paste into it this command "dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz".
----Right click the file, go to Properties, and check "Allow executing file as program". Now run the file by double clicking it.
4. Open a terminal and enter in "sudo gedit /etc/apt/sources.list" (If this doesn't work try the other editors listed in notes) (for the "Is not a directory" problem... We're working on that...)
----On a newline add "deb file:/home/username/Downloads/local_repo /" (replace with the exact path you used)
5. Update/Reload your package manager (eg "sudo apt-get update")
6. Install Wine through a package manager (eg "sudo apt-get install wine")


===Example (YES IT IS VERBOSE-ish)===
I created /home/damian/Downloads/wine_repo/
Opened Firefox, went to http://main.mepis-deb.org/mepiscr/testrepo/pool/test/w/, downloaded wine-gecko/wine-gecko_1.5.0-1mcr110+1_all.deb and wine/wine_1.5.2-1mcr110+1_amd64.deb, place them in wine_repo
Created a document called scan.sh inside wine_repo/ and entered into it "dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz" and executed it. (not sure if I had to mark as executable)
Pressed Alt+F2, typed "gksudo gedit /etc/apt/sources.list", entered password, added in "deb file:/home/damian/Downloads/wine_repo /" to get

Code: Select all

deb http://mirror.csclub.uwaterloo.ca/linuxmint-packages/ debian main upstream import
deb http://debian.linuxmint.com/latest testing main non-free contrib
deb http://debian.linuxmint.com/latest/security testing/updates main non-free contrib
deb http://debian.linuxmint.com/latest/multimedia testing main non-free

deb http://ppa.launchpad.net/freefilesync/ffs-debian/ubuntu oneiric main
deb http://ppa.launchpad.net/freenx-team/ppa/ubuntu lucid main

deb file:/home/damian/Downloads/wine_repo /
Opened Synaptic Package Manager, reloaded packages, searched for wine, marked [wine, wine-gecko, wine-tricks] to be installed, applied changes and waited.
Installed Notepad++ (irrelevant...)
Tried running the Windows version of Xonotic and a couple other games, but they didn't work because they are 32bit, so I researched and found that for the PROPRIETARY NVIDIA driver (other drivers may need something similar) you need to install libgl1-nvidia-glx-ia32. Some games magically started working, even part of Crysis (crashes after the plane intro).


===Notes===
-According to http://forums.debian.net/viewtopic.php?f=16&t=61825 MEPIS isn't too different from Debian package wise.
-You may not have gedit on your computer, if it says you don't have it, try these "pluma, leafpad, kwrite, kate, nano, joe"
-$repo can also be used for other debs you may want to install to take advantage of dependency handling. If you do this often enough, you may want to put the scanning command into an sh file, so you can run it quickly.
-Avoid having multiple packages of the same version but for different distro versions and/or architectures in the repo (pkg_version-dist_arch.deb), when I had the i386 and amd64 packages of wine_1.5.1 for MEPIS 8.0, 8.5, and 11.0 in the repo at the same time, it only listed the i386/11.0 version in the Packages.gz file. Will have to test multiple versions of the same package sometime to see if those work.
-Avoid automatically installing the suggested/recommended packages since this will install a lot of unnecessary kde stuff if it doesn't find gnome-exe-thumbnailer. (I'm assuming the qt/kde libs include some kind of exe thumbnailer since it's listed as a fallback)
-For users of the proprietary nVidia driver (Other drivers may need 32bit compatibility libraries installed as well): Since Wine doesn't support 64bit fully you have to install "libgl1-nvidia-glx-ia32" so that 32bit programs that utilize 3d don't crash. (I might be wrong about the reason, but the solution to crashing works)
-winehq.org recommends using http://dev.carbon-project.org/debian/wine-unstable/ on debian installs, but its a little annoying because it splits Wine up into many packages and doesn't provide wine-gecko. I tried installing it through the "dpkg -i *; apt-get -f install" method, but it didn't work and I don't like the fact that the packages are temporarily broken. It seemed to install successfully with my local repo method, but I didn't bother to test it.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 13 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
roger64
Level 4
Level 4
Posts: 279
Joined: Wed Jun 01, 2011 5:48 am

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by roger64 »

Well, I installed wine yesterday so I could not use your tuto.

I installed using another "Debian" repository and it works well (Wine 1.42 for AMD64). http://www.lamaresh.net/
deb http://www.lamaresh.net/apt squeeze main
and here is the key to enter in terminal:
wget http://www.lamaresh.net/apt/key.gpg && sudo apt-key add key.gpg
I do not have a wine menu though but all my wine apps work well from "other". It provides wine-gecko and MSTT fonts.
I had not installed 3D wine app though and I tried to install this missing package...

Concerning your 3D advice, you should give a warning. I think it could be tricky for people who still use the nouveau driver. It will install as a dependency a lot of new packages, some of them could be conflicting with nouveau. This nouveau is standard install on LMDE.

Image
chinoto

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by chinoto »

The latest wine version available on http://lamaresh.net/ is "1.1.42" (I assume that is what you were referring to), which was released 2010/04/02. The newest version of wine is "1.5.2".

I've changed the note about 3D to make it clear that I'm talking about the proprietary nVidia driver. The way I had phrased that was rather crappy...
roger64
Level 4
Level 4
Posts: 279
Joined: Wed Jun 01, 2011 5:48 am

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by roger64 »

You're right. For me it's OK, maybe others will need brand new versions of wine.

BTW do you know how to make build a Wine menu in the main menu (out of doing it manually of course)?
chinoto

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by chinoto »

Right click the menu icon and click "Edit Menu", goto the desired category, click Add Launcher, the command is "winecfg".

Posted from my phone (which means the instructions aren't exact for now...)

Edit: Apparently it was "New Item" not "Add Launcher".
Last edited by chinoto on Sun Apr 15, 2012 4:31 am, edited 1 time in total.
roger64
Level 4
Level 4
Posts: 279
Joined: Wed Jun 01, 2011 5:48 am

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by roger64 »

chinoto wrote:Right click the menu icon and click "Edit Menu", goto the desired category, click Add Launcher, the command is "winecfg".

Posted from my phone (which means the instructions aren't exact for now...)
I have winecfg but it does nothing to create a wine menu in alacarte main menu.
Found this link too but I did not try it: Wine version is 1.51 for debian (among others)
http://linux.softpedia.com/progDownload ... d-148.html

which in fact send us here:
http://www.winehq.org/site/download where there are Debian debs

Where we learn that the latest stable version is 1.4 and the latest dev one is 1.5.2
chinoto

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by chinoto »

I'm not sure I get it, do you want a menu item for winecfg, menu items for your Windows applications, or something else? Using the default prefix, the command you would put into New Item creator is just "wine $program", but make sure to escape your spaces or wrap the filepath in quotes.
Example:

Code: Select all

wine /home/damian/.wine/drive_c/Program\ Files/Notepad++/notepad++.exe
wine "/home/damian/.wine/drive_c/Program Files/Notepad++/notepad++.exe"
http://www.winehq.org/site/download then links off to http://dev.carbon-project.org/debian/wine-unstable/. I prefer downloading from Mepis over Carbon because Mepis has a ton of people that can effortlessly install Wine and thus have more people to report problems to the Mepis developers, but Carbon Wine is split into 16 packages (annoying), doesn't include gecko (also annoying), managed by a single person, and probably doesn't have much of a user base to notice problems. (I just realized I already mentioned part of this in the end of my notes...)

Found the complete version history for wine, yay :mrgreen: (I've been using it since just before 1.1.z, but it's fun to see). For version x.y.z, even y is stable branch and the version after it is the dev branch (1.0.z=>1.1.z, 1.2.z=>1.3.z, 1.4.z=>1.5.z). I prefer using the dev branch because I get to see how things are progressing and the only problem I can recall is when they changed the sound system, which requires a newer alsa than LM11 provides.
http://source.winehq.org/git/wine.git/tags
roger64
Level 4
Level 4
Posts: 279
Joined: Wed Jun 01, 2011 5:48 am

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by roger64 »

We usually have a wine menu in the main menu, with links to drive C and so on. I do not know which triggers the creation of this menu.

I have a small display problem that I probably could solve on wine if I knew the way. I have a 105 keyboard. The numeric keypad on the right side of it is not recognized by wine. I can use numbers of course, but only from the main part of the keyboard. Also, the French keyboard version is good enough, but I know there is an alternative one which is better for some special keys. I do not know how to correct this on wine. Do you?
roger64
Level 4
Level 4
Posts: 279
Joined: Wed Jun 01, 2011 5:48 am

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by roger64 »

I changed repository again following this post.
http://nicolaselie.wordpress.com/2011/0 ... y-testing/

This time, after update, I've got a category Wine in my main menu...
benjie1

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by benjie1 »

Put the wine and wine-gecko files (for i386) in a $repo folder alone. Followed the instructions at the top of this page. The dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz added 3 entries to Packages file. Then it said to Add deb file to /etc/apt/sources.list.. Said /etc/apt sources.list is not a directory. As a newbie, I don't know what to do so I stopped. Did all this in terminal as user cause I saw nothing that says to be root. Is that a goof? Still trying to get wine 1.5 installed in LMDE with update4 and Cinnamon. BTW, does Add mean the same as copy to a file? If not, how do I add something to a file like above (/etc/apt/sources.list) Thanks again. Bob
CapitalG

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by CapitalG »

hmmm so many ways of doing this :? i want to get the latest amd64 version. which one of these would be best to do?
Pigsy
Level 1
Level 1
Posts: 8
Joined: Tue Apr 24, 2012 6:17 am

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by Pigsy »

I always compile Wine from the source code, this way you don't have to add any extra repos which may cause problems with your Mint installation. It does mean you need to install a bunch of stuff from the normal Mint repos before Wine will compile with all features, but not to worry it's mostly development packages that don't affect anything else.

This is my method on my Mint Debian Edition with Update Pack 4:

Open a terminal session and untar the source tarball downloaded from WineHQ:

Code: Select all

tar -jxvf wine-1.4.tar.bz2
Change into the directory it creates during extraction:

Code: Select all

cd wine-1.4
Make sure you can actually get the system to compile stuff:

Code: Select all

sudo apt-get install build-essential
The README says to run tools/wineinstall. Don't do this, we're going to do it manually using the configure script instead:

Code: Select all

./configure
The script will check your system to see if all software needed for full compilation is there. Once this has finished it will show warnings and you must install this software using apt-get. Generally these are the -dev versions of the package.For example:

Code: Select all

configure: libxrandr development files not found, XRandr won't be supported.
configure: WARNING: libjpeg development files not found, JPEG won't be supported. 
This means you need to install the libxrandr-dev and the libjpeg62-dev packages.

Code: Select all

sudo apt-get install libxrandr-dev libjpeg62-dev
Repeat this for ALL the packages that configure complains about, there will likely be a lot :)

Run the configure script again until it stops giving you warnings. You're now ready to compile Wine, so simply type:

Code: Select all

make
Go and do something else for a while, Wine can take a LONG time to compile.

Once it's finished compiling, it's time to install Wine to your Mint system:

Code: Select all

sudo make install
Finally, don't delete the un-tarred source tree directory. If you ever need to remove Wine you can simply go back into it and use this command to uninstall:

Code: Select all

sudo make uninstall
chinoto

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by chinoto »

benjie1 wrote:Paraphrase: It isn't working!
Sorry about the delay, I've been filling my free time, so I have less free time to think about how to spend my free time :lol:. I'll see if I can make the forum email me when new posts are made here.
Strange that it adds 3 entries to Packages.gz, do you have another deb in there? Extra debs shouldn't matter though. "/etc/apt sources.list" should be "/etc/apt/sources.list", to edit it try "gksudo gedit /etc/apt/sources.list". By "add" I mean to put it on its own line, preferably at the end of the file. "Copy" could mean to overwrite a file with another one instead of merely adding to.
I am going to update the OP with how exactly I did it, in addition to the general instructions.
Pigsy wrote:I always compile Wine from the source code, this way you don't have to add any extra repos which may cause problems with your Mint installation. It does mean you need to install a bunch of stuff from the normal Mint repos before Wine will compile with all features, but not to worry it's mostly development packages that don't affect anything else.
[...]
Finally, don't delete the un-tarred source tree directory. If you ever need to remove Wine you can simply go back into it and use this command to uninstall:

Code: Select all

sudo make uninstall
I've compiled Wine on Ubuntu before to see if I get a performance boost, but I didn't notice anything so I stick with packages since they are quicker. As for uninstallation goes, if you use checkinstall, it will generate a deb from the compiled source and install it (Installation can be toggled in /etc/checkinstallrc or at commandline).
CapitalG wrote:hmmm so many ways of doing this :? i want to get the latest amd64 version. which one of these would be best to do?
Well I'm biased because it's my method, but I think an unbiased person might deem it best as well :). With my method you get the latest stable or experimental wine packages, dependencies are handled by the package manager (instead of checking for each one), and you can reuse the local repo to upgrade to newer wine versions or even install other packages. Of the Debian Wine repositories I know, Mepis is the only one that stays current, include gecko, and uses very few debs (http://lamaresh.net is old, carbon-project uses 16 debs, neither seem to include gecko).
CapitalG

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by CapitalG »

well i would like to try your way chinoto, but im kinda a linux newbie and would surely mess that up :lol: im gonna have to go sober and lay off the wine for a while i guess :mrgreen:
Pigsy
Level 1
Level 1
Posts: 8
Joined: Tue Apr 24, 2012 6:17 am

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by Pigsy »

chinoto wrote: I've compiled Wine on Ubuntu before to see if I get a performance boost, but I didn't notice anything so I stick with packages since they are quicker. As for uninstallation goes, if you use checkinstall, it will generate a deb from the compiled source and install it (Installation can be toggled in /etc/checkinstallrc or at commandline).
This is why I love Linux (and sometimes hate it in equal measure), so many ways to achieve the same goal :)

I've used the Sid debs from WineHQ before, but had problems with them so I went back to compiling from source. Thanks for the heads-up on checkinstall, I've not seen that utility before and it looks pretty useful.
benjie1

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by benjie1 »

Is there a way to install the latest wine without compiling? I don't know how to do that at all. Can wine be installed in LMDE update4 by a newbie from packages in software manager or another source where it is easy to do, sans much editing, no compiling, I am a real novice at Linux. Still would love to try and get it to work. I'm sure it can be done and other noobs may want to do the same, hopefully. Thanks for all the help guys. Bob
CapitalG

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by CapitalG »

i think its easier just to stop using windows programs :lol: which is what im going to do. i only used a couple windows programs i think its time i finally cut the cord and forget the wine stuff.
chinoto

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by chinoto »

benjie1 wrote:Is there a way to install the latest wine without compiling? I don't know how to do that at all. Can wine be installed in LMDE update4 by a newbie from packages in software manager or another source where it is easy to do, sans much editing, no compiling, I am a real novice at Linux. Still would love to try and get it to work. I'm sure it can be done and other noobs may want to do the same, hopefully. Thanks for all the help guys. Bob
Debian has some VERY old packages in other releases (http://packages.debian.org/search?keywords=wine), but without compiling it yourself, editing "/etc/apt/sources.list", or possibly going through dependency hell, you can't get Wine. But of the available methods mine should be pretty easy (especially after I reviewed it again):
First time: Create a folder, add some packages to the folder, create sh file in folder with command in it and run it, add that folder to "/etc/apt/source.list", update/reload package manager, install packages.
Second time: Add packages to folder, run the sh file (double click), update/reload package manager, install/upgrade packages.

Just try the howto again :D
CapitalG wrote:i think its easier just to stop using windows programs :lol: which is what im going to do. i only used a couple windows programs i think its time i finally cut the cord and forget the wine stuff.
It's a nice thought, then I wouldn't worry about whether something is going to work because I just wouldn't use it, but I like Notepad++ and my Windows games too much. (No I'm not going to replace Notepad++) (Although my heavier games are only run on another computer which is running Windows and Linux)
CapitalG

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by CapitalG »

what's so good about notepad ++ on windows? ive never used it, but it's kinda shocking linux wouldn't have something just as good :? im a ps3 user so games are not needed for me :) thanks for the tutorial though if i change my mind ill give it a shot. ive always kinda held on to windows programs and i think this would be a good time to find alternatives on linux.
benjie1

Re: [Howto] Install Wine (and other debs) using Local Reposi

Post by benjie1 »

Almost got things to work from info on your post at top of page. Trouble occurred where it said to add "debfile:$repo/ to /etc/apt/sources.list Was unable to open /etc/apt/sources.list Says sources.list is not a file or directory. Don't know how to add anything to the /etc/apt/sources.list if I can't get it or open it. What's wrong here? Also, don't know what you mean by put dpkg-scanpackages etc in a sh file. What's this? Can't follow the command sudo gedit /etc/apt/sources.list for the reason stated here. So ... guess I have troubles with sources.list, and not knowing much about Linux. I did edit a file a few years ago and it was easy enough. Hope things are still the same and I can add a line at the end of a file IF I can get that sources.list file to open so I can add to it .Will keep trying. Thanks for the help. Bob

HI. Did some reading through google re: /etc/apt/sources.list and can edit it. But my problem is when I entered sudo gedit /etc/apt/sources.list I just got "sources.list" is not a file or directory. There was nothing there to edit that I could see .The examples from sites on google showed a file from sources.list. I just got the above comment. Can you help me solve this problem so I can edit sources.list and get wine installed. :-) Thanks again. Bob
Last edited by benjie1 on Sun May 06, 2012 2:49 pm, edited 1 time in total.
Locked

Return to “LMDE Archive”