package ‘RMySQL’ is not available (for R version 2.15.3) [duplicate] - sql

This question already has answers here:
How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?
(18 answers)
Closed 8 years ago.
I have tried installing RMySQL for three versions of R, but I'm running into same warning message, that RMySQL is not available for that version.
Please, help me out.
Thanks.
install.packages("RMySQL",type="source")
Warning in install.packages("RMySQL", type = "source") :
'lib = "C:/Program Files/R/R-2.15.3/library"' is not writable
--- Please select a CRAN mirror for use in this session ---
also installing the dependency ‘DBI’
trying URL 'http://ftp.iitm.ac.in/cran/src/contrib/DBI_0.2-7.tar.gz'
Content type 'application/x-gzip' length 194699 bytes (190 Kb)
opened URL
downloaded 190 Kb
trying URL 'http://ftp.iitm.ac.in/cran/src/contrib/RMySQL_0.9-3.tar.gz'
Content type 'application/x-gzip' length 165363 bytes (161 Kb)
opened URL
downloaded 161 Kb
<some text missing>
* DONE (DBI)
* installing *source* package 'RMySQL' ...
** package 'RMySQL' successfully unpacked and MD5 sums checked
checking for $MYSQL_HOME... C:\Program Files (x86)\MySQL\MySQL Server 5.6
ERROR: compilation failed for package 'RMySQL'
* removing 'C:/Users/Chanchal/Documents/R/win-library/2.15/RMySQL'
1: running command 'C:/PROGRA~1/R/R-215~1.3/bin/i386/R CMD INSTALL -l "C:\Users\Chanchal\Documents/R/win-library/2.15" C:\Users\Chanchal\AppData\Local\Temp\RtmpErKHEX/downloaded_packages/RMySQL_0.9-3.tar.gz' had status 1
2: In install.packages("RMySQL", type = "source") :
installation of package ‘RMySQL’ had non-zero exit status
> install.packages("RMySQL")
Installing package(s) into ‘C:/Users/Chanchal/Documents/R/win-library/2.15’
(as ‘lib’ is unspecified)
package ‘RMySQL’ is available as a source package but not as a binary
Warning message:
package ‘RMySQL’ is not available (for R version 2.15.3)

I have tried to install RMySQL for R version 3.1.0 on Windows platform. It did not work either. I ran into pretty much the same problem as yours. After reading the documentation for RMySQL package and googled around, I realized that installing RMySQL is very difficult on Windows since it does not have a binary file for Windows as stated in your output.
Instead of RMySQL, I installed RODBC package following instructions here: http://passionfordata.blogspot.com/2012/04/how-to-integrate-r-with-mysql-database.html
RODBC also allows you to connect R to MySQL database, with less trouble and much easier to set up. If your purpose is to connect to MySQL and open to using packages not limited to RMySQL, I would recommend RODBC.

Related

Library not loaded: #rpath/libtbb.dylib in Prophet / Python

I'm on a Mac X1, Monterey.
I've installed prophet and run into this issue when trying to fit a model.
RuntimeError: Error during optimization: console log output:
dyld[90668]: Library not loaded: #rpath/libtbb.dylib
Referenced from: /Users/{username}/opt/anaconda3/lib/python3.9/site-packages/prophet/stan_model/prophet_model.bin
Reason: tried: '/private/var/folders/cd/dfrqgp4s4ll55cwb7rtgccbw0000gq/T/pip-install-rjpuj450/prophet_d7e4cce10e414c89a572fe3605ae9269/build/lib.macosx-11.1-arm64-cpython-39/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/private/var/folders/cd/dfrqgp4s4ll55cwb7rtgccbw0000gq/T/pip-install-rjpuj450/prophet_d7e4cce10e414c89a572fe3605ae9269/build/lib.macosx-11.1-arm64-cpython-39/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/libtbb.dylib' (no such file), '/usr/local/lib/libtbb.dylib' (no such file), '/usr/lib/libtbb.dylib' (no such file)
I know this has to do with the wrong paths being searched. I can find the dylib in
/Users/{user}/opt/anaconda3/lib/python3.9/site-packages/prophet/stan_model/cmdstan-2.26.1/stan/lib/stan_math/lib/tbb/
But, it seems prophet doesn't know to look there. I'm curious how I can update/fix either the rpath variable or find another solution?
I tried to create a symbolic link with sudo ln -s, but don't have permissions on the laptop.
TIA!
I got it to work on Apple Silicon (M1 Max in my case) by installing older versions of both pystan and prophet:
pip install pystan==2.19.1.1
pip install prophet==1.0
The other important piece of the puzzle is that you should use Python 3.8 to get it working.
Installing older versions of the libraries and using Python 3.8 are both talked about in issue #2002 on Github, but there's not really an explanation of the libtbb.dylib error message.

Where is the Windows App Runtime for V1.1.2 (particularly the DDLM component), please?

NuGet delivered the Microsoft.WindowsAppSDK v1.1.2 yesterday (2022-07-02). My updated WinUI 3 programs now produce the following message when run:
This application requires the Windows App Runtime Version 1.1
(MSIX package version >= 1002.543.1943.0)
I uninstalled previous versions of the runtime and ran the suggested installer (from an elevated PowerShell prompt):
Installing license: MSIX_MAINPACKAGE_LICENSE
Install result : 0x0
Installing license: MSIX_SINGLETONPACKAGE_LICENSE
Install result : 0x0
Deploying package: Microsoft.WindowsAppRuntime.1.1_1000.516.2156.0_x64__8wekyb3d8bbwe
Package deployment result : 0x0
Deploying package: Microsoft.WindowsAppRuntime.1.1_1000.516.2156.0_x86__8wekyb3d8bbwe
Package deployment result : 0x0
Deploying package: MicrosoftCorporationII.WinAppRuntime.Main.1.1_1000.516.2156.0_x64__8wekyb3d8bbwe
Package deployment result : 0x0
Provisioning result : 0x0
Deploying package: MicrosoftCorporationII.WinAppRuntime.Singleton_1000.516.2156.0_x64__8wekyb3d8bbwe
Package deployment result : 0x0
Provisioning result : 0x0
Deploying package: Microsoft.WinAppRuntime.DDLM.1000.516.2156.0-x6_1000.516.2156.0_x64__8wekyb3d8bbwe
Package deployment result : 0x0
Provisioning result : 0x0
Deploying package: Microsoft.WinAppRuntime.DDLM.1000.516.2156.0-x8_1000.516.2156.0_x86__8wekyb3d8bbwe
Package deployment result : 0x0
Provisioning result : 0x0
All install operations successful.
Although none of the package FullNames included the sought-for version number 1002.543.1943, this was the result:
(get-appxpackage micro*win*appruntime*).packagefullname
Microsoft.WindowsAppRuntime.1.1_1002.543.1943.0_x64__8wekyb3d8bbwe
Microsoft.WindowsAppRuntime.1.1_1002.543.1943.0_x86__8wekyb3d8bbwe
MicrosoftCorporationII.WinAppRuntime.Main.1.1_1002.543.1943.0_x64__8wekyb3d8bbwe
Microsoft.WinAppRuntime.DDLM.1000.516.2156.0-x6_1000.516.2156.0_x64__8wekyb3d8bbwe
MicrosoftCorporationII.WinAppRuntime.Singleton_1002.543.1943.0_x64__8wekyb3d8bbwe
Microsoft.WinAppRuntime.DDLM.1000.516.2156.0-x8_1000.516.2156.0_x86__8wekyb3d8bbwe
All of the components are of the required version except for the DDLM components (note that if you do not run the installer as an administrator, you only get the 1002 version of the principal runtime components. The .Main* and .Singleton* will be _1000.516.2156).
The problem is, the programs are looking for that DDLM module and they both have an MSIX version number of 1000.516.2156.0 (although they also have a dependency on Microsoft.WindowsAppRuntime.1.1_1002.543.1943.0_x??__8wekyb3d8bbwe).
Does anyone know where I can get an MSIX for the 1002.543.1943.0_x?? DDLM component of the runtime? Or a runtime installer that contains all of the components with the required version number?
Thanks for any help.
As of today (2022-07-05), the download links on the official Microsoft page (Downloads for the Windows App SDK) contain all of the correct versions for the latest update (v1.1.2) to the Windows App Runtime.
Just a note: I removed all of my prior installations of the runtime from a PowerShell prompt before running WindowsAppRuntimeInstall.exe. Running (get-appxpackage micro*win*appruntime*).packagefullname reported no packages but trying to install the new runtime still gave me an error (package already installed but has different contents than the installed version). Although I am the only user of this machine, previous installs added the runtime to system accounts.
To see all installations, run (get-appxpackage micro*win*appruntime* -AllUsers).packagefullname from an elevated PowerShell prompt. Look for versions of the runtime with versions of 1002., DDLM.1001, and DDLM.1000. These may be the culprit as they were all in various versions of the runtime installer (v1.1.2) after it first dropped on July 1st. To remove them from all users, run Remove-AppxPackage -AllUsers -PackageName {package full name}. After removing versions that might have been in the "naughty" packages, try running the new WindowsAppRuntimeInstall.exe again. Everything should work.
What I have learned (thanks #aturnbul) is that to ensure a correct framework package update:
Close the WinUI 3 gallery and any other app using the framework.
Using the PowerShell commands listed by aturnbul remove all older packages
Run WindowsAppRuntimeInstall.exe from an elevated command prompt, so you can see any error that it may throw.
Back in PS you can verify that the installation was complete.
// After a failed installation you get only a partial list of packages
PS C:\Windows\system32> (get-appxpackage micro*win*appruntime* -AllUsers).packagefullname
Microsoft.WindowsAppRuntime.1.1_1004.584.2120.0_x86__8wekyb3d8bbwe
Microsoft.WindowsAppRuntime.1.1_1004.584.2120.0_x64__8wekyb3d8bbwe
// After a successful installation you get all the packages
PS C:\Windows\system32> (get-appxpackage micro*win*appruntime* -AllUsers).packagefullname
Microsoft.WindowsAppRuntime.1.1_1004.584.2120.0_x86__8wekyb3d8bbwe
Microsoft.WindowsAppRuntime.1.1_1004.584.2120.0_x64__8wekyb3d8bbwe
MicrosoftCorporationII.WinAppRuntime.Main.1.1_1004.584.2120.0_x64__8wekyb3d8bbwe
MicrosoftCorporationII.WinAppRuntime.Singleton_1004.584.2120.0_x64__8wekyb3d8bbwe
Microsoft.WinAppRuntime.DDLM.1004.584.2120.0-x6_1004.584.2120.0_x64__8wekyb3d8bbwe
Microsoft.WinAppRuntime.DDLM.1004.584.2120.0-x8_1004.584.2120.0_x86__8wekyb3d8bbwe

selenium2 for composer install facing with phalcon/incubator error in PHP

I am using window command prompt,When I update composer facing with below error
C:\xampp\htdocs\myproject>composer update
Warning: This development build of composer is over 60 days old. It is recommend
ed to update it by running "C:\ProgramData\ComposerSetup\bin\composer.phar self-
update" to get the latest version.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Failed to decode response: zlib_decode(): data error
Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubles
hooting.md#degraded-mode for more info
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for phalcon/incubator dev-master -> satisfiable by ph
alcon/incubator[dev-master].
- phalcon/incubator dev-master requires ext-phalcon >=2.0.4 -> the requested
PHP extension phalcon is missing from your system.
The last line should give you a clue: You haven't yet installed PhalconPHP on your system, which is required by the Incubator package.
Also, run a composer self-update as recommended.

invalid command name "zlib" while executing http::geturl

I'm on TCL 8.5 (can't upgrade) and running version 2.7.7 of the HTTP package. I'm calling a library which appears to be using the following http::geturl command to download an image which has been gzipped:
http::geturl $url -headers {Accept-Encoding gzip}
and I'm getting this error:
invalid command name "zlib"
Searching on the web, I could only find this reference to the bug which basically recommends stopping sending Accept-Encoding gzip, which I can't do (nor can I upgrade to 8.6) http://sourceforge.net/p/tcl/bugs/4784/
My question is: is there any 8.5 workaround for this issue? Is there a way to stop this library from sending the "Accept-Encoding gzip" header?
The issue is that the code believes you've got the zlib package (which supplies the zlib command) available, and so turns on support for gzip-compressed streams. The simplest fix in your code is to do:
package require zlib
So long as this happens before you call into the code that does the http::geturl, this should be enough.
If you don't have the package (in which case you'll get a clear failure from the package require) then you've hit a bug either where the soft dependency code in the http package is getting it wrong when building the request headers, or in the server which is sending gzipped data despite not being asked for it. The code pointed to from TIP #234 (i.e., the SVN repository at http://svn.scheffers.net/zlib) contains the source for a version of the zlib package, in particular it's the version that formed the starting point for the built-in support in Tcl 8.6, but I think it only uses Tcl 8.5 APIs.
Unhelpfully, there are several versions of the zlib package around; this is one of the messiest Tcl packages to acquire, alas.

Using COM in R language

I am trying to get the rcom package for R working. It seems to have installed ok:
> install.packages("rcom");
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://mira.sunsite.utk.edu/CRAN/bin/windows/contrib/2.9/rcom_2.2-1.zip'
Content type 'application/zip' length 204632 bytes (199 Kb)
opened URL
downloaded 199 Kb
package 'rcom' successfully unpacked and MD5 sums checked
The downloaded packages are in
C:\Users\solomon\AppData\Local\Temp\Rtmpzb5oi4\downloaded_packages
updating HTML package descriptions
Then I try to run something:
>comCreateObject("Excel.Application");
Error: could not find function "comCreateObject"
What am I missing, the manual tells me that comCreateObject is the appropriate command. However, the manual's version is somewhat old. Anyone else have any insights?
I can see a couple of potential problems here - rcom has a weird installation.
Did you load the package - that is, run library(rcom) after installing it? I know, I know - but I forget that step all the time, and it would definitely give you the "could not find function" error.
Did you run the installstatconnDCOM() command? I almost didn't notice it telling me to do this.