WampServer, client header and library files - r

WampServer is installed on my computer.
I am wishing to install the RMySQL package.
The online documentation of the latter mentions:
Install a MySQL client library from http://www.mysql.com or http://dev.mysql.com. If you already installed a MySQL server, you may want to re-run the install to ensure that you also installed client header and library files. Note that Xampp doesn't include these.
I am confused I don't know which are these required 'header' and 'library' files. And, how do I know whether they are made available by WampServer? If it is not the case, can I simply add them somewhere to a WampServer folder (instead of uninstalling WampServer and installing Apache and its friends separatedly)?
Thanks,
Édouard

OK so I've just gone through the living hell that is installing RMySQL on Windows. But finally succeeded.
Binaries on windows are not supported, so the other answers saying this is "Simple" are wrong. Also a lot of the guides etc out there are outdated, or have broken links.
The best overall answer for MYSQL generally is to look at:
Using MySQL in R for Windows
Basically you have to install RTools in order to be able to compile the packages from source.
However specifically with WAMPServer, it doesn't install the .lib and client files. So what I did was go to MYSQL to find the exact same version of MYSQL as Wampserver had installed. I downloaded the zip file version. I compared the lib directories with a visual difference tool (Beyond Compare) and copied across the missing files into my WAMPServer MYSQL installation.
As per the guide above, I then copied:
libmysql.lib from mysql/lib to mysql/lib/opt to meet dependencies.
libmysql.dll to C:\Program Files\R\R-2.12.1\bin
Finally install.packages('RMySQL',type='source') worked

For people using WampServer in Windows and wanting to install RMySQL, I've adapted the instructions outlined here. I'm assuming you already have WampServer installed. I'll also use the file paths that I used on my computer, but keep in mind that your file paths may differ slightly (due to different versions, installations, etc.)
Install latest RTools from here.
Create a new file called Renviron.site in C:\Program Files\R\R-2.15.1\etc\, open the file in a text editor, and add a line like MYSQL_HOME="C:/wamp/bin/mysql/mysql5.6.12" (path to your mysql files). Make sure to use forward slashes and don't forget the quotes.
Click on your WampServer icon and go to MySQL, then Version. This will tell you what version of MySQL was included in your WampServer distribution.
Go to http://dev.mysql.com/downloads/mysql and download and install the same version of MySQL that is included in your WampServer distribution.
Once you've gone through the complete installation, go to the folder where MySQL installed and copy the file called libmysql.lib, which can be found in the lib\ folder.
Now go to the lib\ folder in your WampServer directory (mine is C:\wamp\bin\mysql\mysql5.6.12\lib) and create a new folder called opt\.
Paste into this new opt folder the libmysql.lib file that you just copied.
You can now uninstall the MySQL server that you just downloaded, since we only needed that one file from it (which is apparently not included in the WampServer distribution).
Under C:\wamp\bin\mysql\mysql5.6.12\lib\, you'll also find libmysql.dll. Copy this to C:\Program Files\R\R-2.15.1\bin\i386\ (This works if you have 36 bit Windows like me. I think if you have 64 bit, you may just put it under the bin\ subdirectory instead of under bin\i386\, but please don't hold me to that.) I also copied the same file (libmysql.dll) to the C:\windows\system32\ directory, but I'm not sure if this is necessary.
In R, run install.packages('RMySQL',type='source') and hopefully the installation completes without any issues. You can then load the package as usual with library(RMySQL).
Note: I'm running 32 bit Windows, R-2.15.1, and a WampServer distribution that includes MySQL 5.6.12.

Related

How to silently update R for Windows installation

I am aware how to silently install 'R for Windows', but how could I update an existing installation silently to a new version?
Install switches I am currently using:
\\foo\R\R_4.0.5\R-4.0.5-win.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /ALLUSERS /LANGUAGE=en /COMPONENTS="main, x64, translations" /DIR="C:\Program Files\R"
For me, it seems like there is no supported update/upgrade switch. Just installing a new version over an existing one results in just having 2 versions listed in appwiz.cpl.
Forcing the same install dir is not helping either, as you still end up with 2 installations, just in the same folder.
Any hint is appreciated. Thanks in advance.
UPDATE:
I am trying to keep the installations on several machines aligned - therefor it would be helpful to update all machine installations periodically to the latest version and ensure the software inventory solution is not reporting N versions on a single machine.
R is designed so that you can have multiple versions installed simultaneously. This is why each version installs into a different directory.
The canonical way to handle this is to check a registry key for the latest installed version, but if you want to avoid messing with the registry, you can try this:
Install into a custom directory
When it comes to upgrading, move that directory to a temporary location
Install the newer version into the original location
If it works, delete the temp location
If it doesn't, delete the failed install and restore the original
Caveat: untested.

Installing ada libraries from github -- to keep getting file not found error

This is such a noddy question, but I'm struggling to particularly install libadalang which (to avoid X-Y problem) came from me having a working Gnatstudio, installing ada webserver, then I couldn't start Gnatstudio as it required libadalang.so. So I tried to install libadalang and
am currently getting failures of the form
libadalang-iterators-extensions.ads:29:29: file "langkit_support-symbols-precomputed.ads" not found
So I've spammed my /opt/GNAT/2020 with installing langkit everywhere that looks likely.
./lib/langkit_support
./lib/lib/langkit_support
./lib/include/langkit_support
./include/langkit_support
And still the installer for libadalang doesn't work.
Clearly something going on with paths here that I'm not getting. Can anyone provide any information on how paths are supposed to work as I need to install a number of other ada and SPARK-ada libraries from github and I want to do it correctly.
I think, the simplest way to restore GNAT Studio is to delete everything and reinstall. The GNAT Studio has its-own copy of libadalang/langkit. Look for
<install-path>/lib/gnatstudio/libadalang.so
<install-path>/lib/gnatstudio/liblangkit_support.so
When you install a developer version of libadalang you will get another copy of these files. They could have a different version.
I would suggest you to install GNAT Studio into a dedicated directory and make sure you launch it with a shell script from the bin (bin/gnatstudio). This way it shouldn't be affected by any other installed libraries.
Installing AWS shouldn't break GNAT Studio installation. If you know how to reproduce, please report to AdaCore.

How do I upgrade MinTTY in Git for Windows

I appreciate that this is borderline off-topic, but it does "directly involve programming or programming tools" so I figure it's just about OK...
I've just installed a newly downloaded version of Git for Windows, and noticed that in the Options dialog, the title bar says "mintty 2.8.5 is available". According to the About dialog, I currently have version 2.8.4.
I assume it's telling me that there's a new version because I am able to upgrade it myself, but I can't find any information about how to do so. I've downloaded the zip file from mintty.github.io, but don't really want to have to build it manually if I can avoid it.
Is there some way to do this, or is the easiest option just to wait for an updated build of Git For Windows that includes the new version of MinTTY?
mintty is a terminal emulator program available for Cygwin and msys2 environment. In both environment, mintty can be compiled as 32bit and 64bit. Hence it will be easy to deploy if users/package maintainer compile themselves with their own toolchain. Here are the two mainstream toolchain associated with mintty.
Cygwin: You can search the full package namecygwin package search. Cygwin maintains multiple mirror URLs to download a package. Here is one of the mirror:
32bit: https://mirrors.kernel.org/sourceware/cygwin/x86/release/mintty/
64bit: https://mirrors.kernel.org/sourceware/cygwin/x86_64/release/mintty/
msys2: msys2 also maintains mirror URLs to download. You can browse whole packages list in http://repo.msys2.org/. Open that URL in a browser. As mintty need msys2 dynamic library, it can be found in msys2 directory. Search mintty in these webpages:
32bit: http://repo.msys2.org/msys/i686/
64bit: http://repo.msys2.org/msys/x86_64/
To use it in Git-For-Windows, download the mintty tarball file from msys2 links according to your installed one 32bit or 64bit. You can find mintty.exe in that .tar.xz file's usr/bin folder. Extract and place that executable in Git-For-Windows installation folder e.g. C:\Program Files\Git\usr\bin.
Note: Mintty need a dynamic library (e.g. cygwin1.dll or msys-2.0.dll) and a shell (e.g. bash.exe, dash.exe etc.) or a command line program to run. And it should be placed in /usr/bin or /bin folder as per your specific environment. For Cygwin specifically, you also need cygwin-console-helper.exe to hide the console window (conhost.exe process). In msys2 environment, mintty version may be lower than the Cygwin one.
I was having a similar issue with Git Bash saying "mintty 3.5.2 available". I simply used the following command in Git Bash.
git update-git-for-windows
It re-ran the installer and updated both my Git for Windows and mintty versions to the latest ones. The command is only valid from Git for Windows v2.16.1(2) though.

Where to install "guile-git" on Ubuntu 14?

I got stuck installing "git clone https://gitlab.com/guile-git/guile-git.git". In which directory is this supposed to be cloned and installed?
Dunno if you're still looking for an answer but it doesn't seem you need this installed to install guix; the read-me of the repository says that you can install it via guix. guix is an agnostic package manager that you can install on any Linux distribution alongside the default package manager and guix is the default package manager of the GuixSD operating system (https://www.gnu.org/software/guix/).
If you're on a distro which doesn't use guix, you may not want to install guix (I've yet to find reason enough to, yet); if you use a lot of GNU tools or Guile (some Guile packages are available through guix), you may want to.
Most repositories that don't have a binary for you to run follow the build process of configure, make, and [sudo ]make install.
I cloned the repository, myself, and find that this one does, as well.
Get a terminal (if you haven't been using one, yet) and cd into the directory you cloned the repository to and then cd into the guile-git directory (cd guile-git).
If we do ls -l, we'll see that the only executable file there is the bootstrap one; I've never seen one before but doing ./bootstrap generates the configure file and sets up the make process for us. So now back in familiar territory.
Given these are Guile files, we'll probably want to install this under the same prefix as where Guile is installed so run which guile. I believe, if you install it under Ubuntu (I'm running Linux Mint), it'll install to /usr/bin/ but, if you install it manually, it'll install to /usr/local/bin/.
The latter is where mine is and that's the default prefix that configure uses so I can just do ./configure; if you wanted to install it under /usr/, run /.configure --prefix=/usr/.
This'll verify that all of the necessary libraries and programs that guile-git needs are installed and properly setup. Heads up that configure balked at me over not having the Guile module bytestructures installed (https://github.com/TaylanUB/scheme-bytestructures) so you may need to do that.
I'm not going to run through everything to get it installed but, once you can run it without any errors, run make to build it within the directory.
If you want to install it permanently on your computer with the rest of your operating system able to detect it, run make install. Since you'll likely've specified a directory under /usr, you'll have to do sudo make install so that the make process can have permissions to install under /usr/local or /usr.
Sorry if I reiterated anything you already knew; 'just didn't want to assume you knew something and result in confusion.

Plone4 - Installing addons

I am new to Plone and I am having trouble understanding how to install addons. I have read the documentation provided on their site, but I am still a bit confused.
The addon that I am trying to install is http://plone.org/products/uwosh.timeslot.
In the documentation, I see them using a something like cmd.exe, but I am not really sure what it is. Is it the python.exe located in the python folder?
Also, I am not clear if the addon that I wish to install is in an "egg" form.
Could someone please provide me with a detailed process for installation?
Thank you.
http://plone.org/documentation/kb/installing-add-ons-quick-how-to
Find, then edit your buildout.cfg file per instructions above to add the uwosh.timeslot egg.
Re-run bin/buildout (or bin\buildout on windows) from the main plone directory on the command-line (do not run from the bin directory as your current working directory).
Answering your other questions:
Yes, packages listed on PyPI.python.org are "eggs" in the sense that you install them as eggs in buildout, not classic "Products".
cmd.exe is MS Windows command-line, assuming you are using Windows, not Unix.
This is only useful if you know where your Plone installation is located on disk -- you should.

Resources