Running mysqltuner on Mac OSX - mysql

I use Zend Server CE on my Mac running OSX Snow Leopard for my development environment. I need to tune up MySQL and have used mysqltuner.pl in the past on Linux servers to do pre- and post-testing.
I downloaded the script and get the following errors when I run it:
couldn't find diagnostic data in /System/Library/Perl/5.10.0/pods/perldiag.pod /Library/Perl/Updates/5.10.0 /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Network/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.10.0 . ./mysqltuuner.pl at /System/Library/Perl/5.10.0/diagnostics.pm line 268, <POD_DIAG> line 647.
Compilation failed in require at ./mysqltuuner.pl line 42, <POD_DIAG> line 647.
BEGIN failed--compilation aborted at ./mysqltuuner.pl line 42, <POD_DIAG> line 647.
Snow Leopard has perl and I have the XCode Development Tools installed.
It looks like I am missing some Perl modules. I have tried to CPAN the files, but I'm not a Perl wonk and I think I might have screwed up my Perl install now.
Any ideas???

Looks like something in there is using the diagnostics module, which requires the perl documentation to function correctly. I'm guessing the perl documentation is a separately installable component from perl itself in OS X.

Related

Perl to mysql connectivity on Windows 10

I have a process that works in the production environment, that I need to get working on my local Windows 10 environment. It is a Perl script that calls mySql stored procedures.
I have installed ActivePerl 5.26.3 (64-Bit) from Active State. When I attempt to execute the script I get an error:
Can't locate DBD/mysql.pm (you may need to install the DBD::mysql module)...
So, I went to https://metacpan.org/release/DBD-mysql and found instructions that indicated I needed to do the following:
perl -MCPAN -e shell
install DBD::mysql
But, when I type the first command I get a message stating:
It looks like you don't have a C compiler and make utility installed. Trying to install dmake and the MinGW gcc compiler using the Perl Package Manager. This may take several minutes....
Then it goes thru what appears to be a successful installation. So I type in the second command. It scrolls by for a while, but ends with:
Failed during this command
DVEEDEN/DBD-mysql-4.050.tar.gz: writemakefile NO 'C:\Perl64\bin\perl.exe MakeFile.PL INSTALLDIRS=site' returned status 512
Not sure how to proceed.
For ActivePerl, use their package manager PPM.
Or, use Strawberry Perl for a more unixy experience. It comes with all the stuff to compile and install modules.
No matter which Perl you use, on Windows or elsewhere, modules typically need to be compiled the same. Mixing compilers (such as Visual Studio and gcc) or options can lead to incompatible binaries. The same might happen across Perl versions too. That means to use the same Perl (and compilation method) for everything in your project).
The cpan utility doesn't figure out those things for you. It does whatever it's configured to do.
For what it's worth, the cpan method to install modules can be simpler:
$ cpan DBD::mysql

sndfile not found on your system and thus audioinfo is not functional (brew octave 4.0.0 mac)

After upgrading to Octave 4.0.0 from 3.8.2 using brew upgrade on a Mac OS X, I'm now getting this error when trying to use wavread:
error: sndfile not found on your system and thus audioinfo is not functional
error: called from
wavread at line 91 column 8
I tried re-installing libsndfile, port audio, and even octave but still could not resolve this.
It's because the homebrew formula for Octave doesn't list portaudio and libsndfile as dependencies. Homebrew appears to run a special version of pkg-config during installation, which only has access to libraries that are explicitly listed as dependencies in the formula.
I managed to get it to work by doing
brew edit octave
then adding these lines somewhere near the top of the formula:
depends_on "libsndfile"
depends_on "portaudio"
and these lines a bit lower down, where the args string to the configure command is being constructed
args << "--with-portaudio"
args << "--with-sndfile"
Then install octave and ensure that it builds from source. Something like
brew install octave --build-from-source --with-gui
Ideally portaudio and sndfile would be enabled with a switch like --with-audio or something. If I get a chance I'll submit a pull request to homebrew with the necessary changes.
Edit: 12th October 2015
This is now the subject of a pull request in the homebrew-science tap
https://github.com/Homebrew/homebrew-science/pull/2875

Using MPI4PY in FedoraScientific

Recently, I downloaded and installed Fedora Scientific 20 as I was
impressed with the list of included software. My interest in the software
is due to the inclusion of the MPI framework. I was able to compile and
execute a simple C program using mpicc and mpiexec. However, I need some
help using MPI4PY to call OpenMPI using Python code.
At the terminal prompt, if I try:
$ /lib64/openmpi/bin/mpiexec -n 2 python3 helloworld.py
The Traceback reports that an
ImportError: No module named 'mpi4py'
has been raised. The helloworld.py program was an example found online with
line 6 being from mpi4py import MPI.
Since Apper indicates that mpi4py has been installed for both Python2 and
Python3 for OpenMPI as part of the installation of Fedora Scientific, I'm not sure what might be wrong. Could somebody please advise as to how to use this package?
It sounds like there is something wrong with your environment. Perhaps mpi4py, since you have confirmed it is installed, is installed in a a strange place. Would setting PYTHONPATH help?
https://docs.python.org/2/using/cmdline.html#environment-variables

DBI installation on perl 5.10.0 MacOS 10.6.8

I'm trying to install program called OrthoMCL on MacOS X 10.6.8 Snow Leopard. For it's work it needs DBI module for Perl. On my machine I have two perl installations - prebuild 5.10.0 version on /usr/bin/perl (call it Perl1) and 5.12.3 MacPorts installation (call it Perl2) which I actually use.
Problem is that OrthoMCL is trying to work with /usr/bin/perl. If I try to install CPAN DBI and DBD::mysql modules from CPAN for Perl1 I have errors like:
lipo: can't open input file: /var/tmp//ccOBwzHU.out (No such file or directory)
make: *** [Perl.o] Error 2
External compilation with
/usr/bin/perl Makefile.PL
make
results the same error.
I can install DBI and DBD::mysql on Perl2, but OrthoMCL doesn't work with it.
Addition Perl2 modules pathways to PERL5LIB variable does error with attempt to work with Perl1:
Perl lib version (5.12.4) doesn't match executable version (v5.10.0) at /opt/local/lib/perl5/5.12.4/darwin-thread-multi-2level/Config.pm line 50.
So I have two questions:
Is there an idea how can I install DBI and DBD::mysql modules for Perl1.
Does anybody know how can I force OrthoMCL to work with Perl2?
Thanks!
Try sudo /usr/bin/perl Makefile.PL && make.
Regarding perl version, you need to install the modules for your second perl version too for it to work. I don't know of OrthoMCL at all, but I'd consult it's documentation regarding how it works together with perl.
On Mac OS X, I would strongly recommend never using the system perl at all, and instead using App::Perlbrew to install and use a perl in your home directory.
For more than a few years, OS X's perl has been broken in various ways that are nearly impossible to fix unless you are a guru. It's a rathole you don't want to go down.
Perl applications should not be hardcoding /usr/bin/perl on their first ("shebang") line: that is a bug. Replace it with /usr/bin/env perl, which will run whichever perl you've selected with perlbrew.

how to install tcl on solaris sparc

I have a solaris machine configuration: SunOS indevel07 5.10 Generic_147440-15 sun4v sparc sun4v. I am trying to install expect utility on this. expect utility requires tcl to be installed. I have tried to install that too, but i am getting errors. I have downloaded the tcl-8.5.12-sol10-sparc-local.gz and expect-5.45-sol10-sparc-local.gz from sunfreeware. I have unzipped them and tried to install them like pkgadd -d pkgname. I am getting errors like:
ERROR: attribute verification of </usr/local/man/man3/Tcl_Seek.3> failed
pathname does not exist
There are lots of errors like this. I tried to troubleshoot it by googling but could not find anything about it. I am stuck with my development because of this.
Try building Tcl/Tk and Expect from the source. Here is the instruction - How to Compile Tcl. Expect download - Obtaining Expect for UNIX. That worked for me on Solaris 10 and I did not hit any serious bumps.
For those who want to install tcl please refer this URL. it has got steps to do that. URL: http://www.wellho.net/mouth/1174_Installing-Tcl-and-Expect-on-Solaris-10-a-checklist.html