Can't install JSON.pm - json

I'm trying to use a Perl script to transform my data structure into a JSON-format string. This uses the asm2stats.pl Perl script in the pl folder here
Here is the command line I used
perl /Users/Buscou.out/ACG-scaffold.fa > output.json
But I got this issue:
Can't locate JSON.pm in #INC (you may need to install the JSON module) (#INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /Users/etudiant/Downloads/assembly-stats-master/pl/asm2stats.pl line 5.
BEGIN failed--compilation aborted at /Users/etudiant/Downloads/assembly-stats-master/pl/asm2stats.pl line 5.
BY looking in internet, I made these installations:
brew install cpanm
and
sudo cpan JSON
but I still get the same error..
Here is the issue I get when I run cpanm --force install JSON :
!
! Can't write to /Library/Perl/5.18 and /usr/local/bin: Installing modules to /Users/etudiant/perl5
! To turn off this warning, you have to do one of the following:
! - run me as a root or with --sudo option (to install to /Library/Perl/5.18 and /usr/local/bin)
! - Configure local::lib in your existing shell to set PERL_MM_OPT etc.
! - Install local::lib by running the following commands
!
! cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
!
--> Working on install
Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/install-0.01.tar.gz ... OK
Configuring install-0.01 ... OK
Building and testing install-0.01 ... FAIL
! Installing install failed. See /Users/etudiant/.cpanm/work/1526230657.17102/build.log for details. Retry with --force to force install it.
--> Working on JSON
Fetching http://www.cpan.org/authors/id/I/IS/ISHIGAKI/JSON-2.97001.tar.gz ... OK
Configuring JSON-2.97001 ... OK
Building and testing JSON-2.97001 ... FAIL
! Installing JSON failed. See /Users/etudiant/.cpanm/work/1526230657.17102/build.log for details. Retry with --force to force install it.
Content of the 1526230657.17102/build.log file:
more /Users/etudiant/.cpanm/work/1526230657.17102/build.log
cpanm (App::cpanminus) 1.7044 on perl 5.018002 built for darwin-thread-multi-2level
Work directory is /Users/etudiant/.cpanm/work/1526230657.17102
You have make /usr/bin/make
You have LWP 6.05
You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3
You have /usr/bin/unzip
!
! Can't write to /Library/Perl/5.18 and /usr/local/bin: Installing modules to /Users/etudiant/perl5
! To turn off this warning, you have to do one of the following:
! - run me as a root or with --sudo option (to install to /Library/Perl/5.18 and /usr/local/bin)
! - Configure local::lib in your existing shell to set PERL_MM_OPT etc.
! - Install local::lib by running the following commands
!
! cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
!
Searching install () on cpanmetadb ...
--> Working on install
Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/install-0.01.tar.gz
-> OK
Unpacking install-0.01.tar.gz
Entering install-0.01
Checking configure dependencies from META.yml
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.34)
Configuring install-0.01
Running Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for install
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.34)
Building and testing install-0.01
cp lib/install.pm blib/lib/install.pm
Manifying 1 pod document
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/install.t .. ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.02 cusr 0.00 csys = 0.06 CPU)
Result: PASS
Manifying 1 pod document
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/Users/etudiant/perl5/lib/perl5'
Do not have write permissions on '/Users/etudiant/perl5/lib/perl5'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
at -e line 1.
make: *** [pure_site_install] Error 13
-> FAIL Installing install failed. See /Users/etudiant/.cpanm/work/1526230657.17102/build.log for details. Retry with --force to force install it.
Searching JSON () on cpanmetadb ...
--> Working on JSON
Fetching http://www.cpan.org/authors/id/I/IS/ISHIGAKI/JSON-2.97001.tar.gz
-> OK
Unpacking JSON-2.97001.tar.gz
Entering JSON-2.97001
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.34)
Configuring JSON-2.97001
Running Makefile.PL
Welcome to JSON (v.2.97001)
=============================
** BACKWARD INCOMPATIBILITY **
Since version 2.90, stringification (and string comparison) for
JSON::true and JSON::false has not been overloaded. It shouldn't
matter as long as you treat them as boolean values, but a code that
expects they are stringified as "true" or "false" doesn't work as
you have expected any more.
if (JSON::true eq 'true') { # now fails
print "The result is 1 now."; # => The result is 1 now.
And now these boolean values don't inherit JSON::Boolean, either.
When you need to test a value is a JSON boolean value or not, use
JSON::is_bool function, instead of testing the value inherits
a particular boolean class or not.
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for JSON
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.34)
Checking if you have Test::More 0 ... Yes (0.98)
Building and testing JSON-2.97001
cp lib/JSON/backportPP/Compat5005.pm blib/lib/JSON/backportPP/Compat5005.pm
cp lib/JSON/backportPP/Boolean.pm blib/lib/JSON/backportPP/Boolean.pm
cp lib/JSON/backportPP/Compat5006.pm blib/lib/JSON/backportPP/Compat5006.pm
cp lib/JSON/backportPP.pm blib/lib/JSON/backportPP.pm
cp lib/JSON.pm blib/lib/JSON.pm
Manifying 5 pod documents
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
# JSON::backportPP 2.97001
t/00_backend_version.t ................ ok
t/00_load.t ........................... ok
t/00_load_backport_pp.t ............... ok
t/00_pod.t ............................ ok
t/01_utf8.t ........................... ok
t/02_error.t .......................... ok
t/03_types.t .......................... ok
t/06_pc_pretty.t ...................... ok
t/07_pc_esc.t ......................... ok
t/08_pc_base.t ........................ ok
t/09_pc_extra_number.t ................ ok
t/104_sortby.t ........................ ok
t/105_esc_slash.t ..................... ok
t/106_allow_barekey.t ................. ok
t/107_allow_singlequote.t ............. ok
t/108_decode.t ........................ ok
t/109_encode.t ........................ ok
t/10_pc_keysort.t ..................... ok
t/110_bignum.t ........................ ok
t/112_upgrade.t ....................... ok
t/113_overloaded_eq.t ................. ok
t/114_decode_prefix.t ................. ok
t/115_tie_ixhash.t .................... ok
t/116_incr_parse_fixed.t .............. ok
t/117_numbers.t ....................... ok
t/11_pc_expo.t ........................ ok
t/12_blessed.t ........................ ok
t/13_limit.t .......................... ok
t/14_latin1.t ......................... ok
t/15_prefix.t ......................... ok
t/16_tied.t ........................... ok
t/17_relaxed.t ........................ ok
t/18_json_checker.t ................... ok
t/19_incr.t ........................... ok
t/20_unknown.t ........................ ok
t/21_evans_bugrep.t ................... ok
t/22_comment_at_eof.t ................. ok
t/99_binary.t ......................... ok
t/e00_func.t .......................... ok
t/e01_property.t ...................... ok
# 1
t/e02_bool.t .......................... ok
t/e03_bool2.t ......................... ok
t/e11_conv_blessed_univ.t ............. ok
t/e90_misc.t .......................... ok
t/gh_28_json_test_suite.t ............. ok
t/gh_29_trailing_false_value.t ........ ok
t/rt_116998_wrong_character_offset.t .. ok
t/rt_90071_incr_parse.t ............... ok
t/x00_load.t .......................... ok
t/x02_error.t ......................... ok
t/x12_blessed.t ....................... ok
t/x16_tied.t .......................... ok
t/x17_strange_overload.t .............. ok
t/xe04_escape_slash.t ................. ok
t/xe05_indent_length.t ................ ok
t/xe12_boolean.t ...................... ok
t/xe19_xs_and_suportbypp.t ............ ok
t/xe20_croak_message.t ................ ok
t/xe21_is_pp.t ........................ ok
t/zero-mojibake.t ..................... ok
All tests successful.
Files=60, Tests=3720, 5 wallclock secs ( 0.47 usr 0.16 sys + 4.45 cusr 0.34 csys = 5.42 CPU)
Result: PASS
Manifying 5 pod documents
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/Users/etudiant/perl5/lib/perl5'
Do not have write permissions on '/Users/etudiant/perl5/lib/perl5'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
at -e line 1.
make: *** [pure_site_install] Error 13
-> FAIL Installing JSON failed. See /Users/etudiant/.cpanm/work/1526230657.17102/build.log for details. Retry with --force to force install it.

Related

Fail in installing DBD::mysql in Mac using cpanm

I am constantly failing in installing DBD::mysql.
The command I used was:
brew install mysql
cpanm DBD::mysql
The error I got was:
--> Working on DBD::mysql
Fetching http://www.cpan.org/authors/id/D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz ... OK
Configuring DBD-mysql-4.050 ... N/A
! Configure failed for DBD-mysql-4.050. See /Users/jeji/.cpanm/work/1642350924.83890/build.log for details.
Therefore, I checked by log file. My log file read:
cpanm (App::cpanminus) 1.9018 on perl 5.030003 built for darwin-thread-multi-2level
Work directory is /Users/jeji/.cpanm/work/1642350924.83890
You have make /usr/bin/make
You have LWP: 6.44
You have LWP::Protocol::https: 6.07
You have /usr/bin/tar: bsdtar 3.5.1 - libarchive 3.5.1 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8
You have /usr/bin/unzip
Searching DBD::mysql () on cpanmetadb ...
--> Working on DBD::mysql
Fetching http://www.cpan.org/authors/id/D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz
-> OK
Unpacking DBD-mysql-4.050.tar.gz
Entering DBD-mysql-4.050
Checking configure dependencies from META.json
Checking if you have DBI 1.609 ... Yes (1.643)
Checking if you have Data::Dumper 0 ... Yes (2.174)
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.34)
Checking if you have Devel::CheckLib 1.09 ... Yes (1.14)
Configuring DBD-mysql-4.050
Running Makefile.PL
PLEASE NOTE:
For 'make test' to run properly, you must ensure that the
database user 'jeji' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.
mysql> grant all privileges on test.* to 'jeji'#'localhost' identified by 's3kr1t';
You can also optionally set the user to run 'make test' with:
perl Makefile.PL --testuser=username
I will use the following settings for compiling and testing:
cflags (mysql_config) = -I/usr/local/Cellar/mysql/8.0.27_1/include/mysql
embedded (guessed ) =
ldflags (guessed ) =
libs (mysql_config) = -L/usr/local/Cellar/mysql/8.0.27_1/lib -lmysqlclient -lz -lzstd -lssl -lcrypto -lresolv
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
nossl (default ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testport (default ) =
testsocket (default ) =
testuser (guessed ) = jeji
To change these settings, see 'perl Makefile.PL --help' and
'perldoc DBD::mysql::INSTALL'.
Checking if libs are available for compiling...
Can't link/include C library 'ssl', 'crypto', aborting.
-> N/A
Checking dependencies from META.json ...
Checking if you have Time::HiRes 0 ... Yes (1.9760)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.34)
Checking if you have Test::Deep 0 ... Yes (1.130)
Checking if you have Test::Simple 0.90 ... Yes (1.302162)
Checking if you have bigint 0 ... Yes (0.51)
Checking if you have DBI 1.609 ... Yes (1.643)
-> FAIL Configure failed for DBD-mysql-4.050. See /Users/jeji/.cpanm/work/1642350924.83890/build.log for details.
I do think that 'Can't link/include C library 'ssl', 'crypto', aborting.
-> N/A' is the part that is causing the issue, but I have no clue in how to approach the problem.
Any solutions would be great!
Thanks in advance :)
Here's how I got DBD::mysql installed on macOS:
cpan -T DBI
sudo cpanm DBD::mysql -n \
--configure-args="--libs='-L/usr/local/opt/openssl/lib -lssl -lcrypto -lperconaserverclient'"
I was installing Percona Server instead of MySQL so you might not need the last option.
Update: In more recent releases of MacOS, I can't get this to work. I tried for a few days to resolve the compile errors, but then I gave up. I'll use Python now. The era of Perl is over, which makes me sad because I've enjoyed using Perl since around 1996.

Tidy HTML5 & PHP7

So I am on an Ubuntu server at Digital Ocean and I'm trying to install/configure Tidy HTML5 with my current PHP7 Wordpress installation and W3 Total Cache.
However even though I've installed Tidy with the following commands:
sudo apt-get remove libtidy-0.99-0 tidy -y
sudo wget -O /tmp/tidy-5.2.0-64bit.deb http://binaries.html-tidy.org/binaries/tidy-5.2.0/tidy-5.2.0-64bit.deb
sudo dpkg -i /tmp/tidy-5.2.0-64bit.deb
sudo rm /tmp/tidy-5.2.0-64bit.deb
And it even says that it is at Version 5.2.0, yet it doesn't seem to be loaded/installed.
rafael#wordpress-staging:~$ php --ini
Configuration File (php.ini) Path: /etc/php/7.0/cli
Loaded Configuration File: /etc/php/7.0/cli/php.ini
Scan for additional .ini files in: /etc/php/7.0/cli/conf.d
Additional .ini files parsed: /etc/php/7.0/cli/conf.d/10-mysqlnd.ini,
/etc/php/7.0/cli/conf.d/10-opcache.ini,
/etc/php/7.0/cli/conf.d/10-pdo.ini,
/etc/php/7.0/cli/conf.d/15-xml.ini,
/etc/php/7.0/cli/conf.d/20-apcu.ini,
/etc/php/7.0/cli/conf.d/20-bz2.ini,
/etc/php/7.0/cli/conf.d/20-calendar.ini,
/etc/php/7.0/cli/conf.d/20-ctype.ini,
/etc/php/7.0/cli/conf.d/20-curl.ini,
/etc/php/7.0/cli/conf.d/20-dom.ini,
/etc/php/7.0/cli/conf.d/20-exif.ini,
/etc/php/7.0/cli/conf.d/20-fileinfo.ini,
/etc/php/7.0/cli/conf.d/20-ftp.ini,
/etc/php/7.0/cli/conf.d/20-gd.ini,
/etc/php/7.0/cli/conf.d/20-gettext.ini,
/etc/php/7.0/cli/conf.d/20-gmp.ini,
/etc/php/7.0/cli/conf.d/20-iconv.ini,
/etc/php/7.0/cli/conf.d/20-json.ini,
/etc/php/7.0/cli/conf.d/20-mbstring.ini,
/etc/php/7.0/cli/conf.d/20-mysqli.ini,
/etc/php/7.0/cli/conf.d/20-pdo_mysql.ini,
/etc/php/7.0/cli/conf.d/20-phar.ini,
/etc/php/7.0/cli/conf.d/20-posix.ini,
/etc/php/7.0/cli/conf.d/20-pspell.ini,
/etc/php/7.0/cli/conf.d/20-readline.ini,
/etc/php/7.0/cli/conf.d/20-recode.ini,
/etc/php/7.0/cli/conf.d/20-shmop.ini,
/etc/php/7.0/cli/conf.d/20-simplexml.ini,
/etc/php/7.0/cli/conf.d/20-soap.ini,
/etc/php/7.0/cli/conf.d/20-sockets.ini,
/etc/php/7.0/cli/conf.d/20-sysvmsg.ini,
/etc/php/7.0/cli/conf.d/20-sysvsem.ini,
/etc/php/7.0/cli/conf.d/20-sysvshm.ini,
/etc/php/7.0/cli/conf.d/20-tokenizer.ini,
/etc/php/7.0/cli/conf.d/20-wddx.ini,
/etc/php/7.0/cli/conf.d/20-xmlreader.ini,
/etc/php/7.0/cli/conf.d/20-xmlrpc.ini,
/etc/php/7.0/cli/conf.d/20-xmlwriter.ini,
/etc/php/7.0/cli/conf.d/20-xsl.ini,
/etc/php/7.0/cli/conf.d/20-zip.ini
rafael#wordpress-staging:~$ tidy -v
HTML Tidy for Linux version 5.2.0
Am I missing something here? Or doesn't HTML Tidy work with PHP7? Because I've installed HTML Tidy with the above mentioned commands without any problem on a PHP5.6 installation just fine recently.
Either way thanks for any suggestions or information.
Edit:
I've removed Tidy completely, installed the original from 2009, still not detected, then removed it again and installed the latest version again but yet again it's still not being detected:
rafael#wordpress-staging:~$ sudo apt-get install tidy
Reading package lists... Done
Building dependency tree
Reading state information... Done
tidy is already the newest version (20091223cvs-1.5).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
tidy : Depends: libtidy-0.99-0 (>= 20091223cvs-1.5) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
rafael#wordpress-staging:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libtidy-0.99-0
The following NEW packages will be installed:
libtidy-0.99-0
0 upgraded, 1 newly installed, 0 to remove and 59 not upgraded.
1 not fully installed or removed.
Need to get 0 B/120 kB of archives.
After this operation, 419 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 120416 files and directories currently installed.)
Preparing to unpack .../libtidy-0.99-0_20091223cvs-1.5_amd64.deb ...
Unpacking libtidy-0.99-0 (20091223cvs-1.5) ...
Setting up libtidy-0.99-0 (20091223cvs-1.5) ...
Setting up tidy (20091223cvs-1.5) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
rafael#wordpress-staging:~$ sudo apt-get -y autoremove tidy
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
libtidy-0.99-0 tidy
0 upgraded, 0 newly installed, 2 to remove and 59 not upgraded.
After this operation, 505 kB disk space will be freed.
(Reading database ... 120421 files and directories currently installed.)
Removing tidy (20091223cvs-1.5) ...
Removing libtidy-0.99-0 (20091223cvs-1.5) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
rafael#wordpress-staging:~$ sudo wget -O /tmp/tidy-5.2.0-64bit.deb http://binaries.html-tidy.org/binaries/tidy-5.2.0/tidy-5.2.0-64bit.deb
--2017-02-22 20:15:50-- http://binaries.html-tidy.org/binaries/tidy-5.2.0/tidy-5.2.0-64bit.deb
Resolving binaries.html-tidy.org (binaries.html-tidy.org)... 151.101.64.133, 151.101.128.133, 151.101.192.133, ...
Connecting to binaries.html-tidy.org (binaries.html-tidy.org)|151.101.64.133|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 727594 (711K) [application/octet-stream]
Saving to: ‘/tmp/tidy-5.2.0-64bit.deb’
/tmp/tidy-5.2.0-64bit.deb 100%[==============================================>] 710.54K --.-KB/s in 0.007s
2017-02-22 20:15:50 (100 MB/s) - ‘/tmp/tidy-5.2.0-64bit.deb’ saved [727594/727594]
rafael#wordpress-staging:~$ sudo dpkg -i /tmp/tidy-5.2.0-64bit.deb
Selecting previously unselected package tidy.
(Reading database ... 120410 files and directories currently installed.)
Preparing to unpack /tmp/tidy-5.2.0-64bit.deb ...
Unpacking tidy (5.2.0) ...
Setting up tidy (5.2.0) ...
Processing triggers for man-db (2.7.5-1) ...
rafael#wordpress-staging:~$ sudo rm /tmp/tidy-5.2.0-64bit.deb
rafael#wordpress-staging:~$ tidy -v
HTML Tidy for Linux version 5.2.0
rafael#wordpress-staging:~$ sudo service apache2 restart
Am I really missing something here?

Unable to install JSON::Parse with cpan

I'm trying to install JSON::Parse through cpan on an old Debian Etch server. When I do, it fails:
cpan[2]> install JSON::Parse
CPAN: Storable loaded ok (v2.15)
Going to read /root/.cpan/Metadata
Database was generated on Wed, 23 Nov 2016 14:41:02 GMT
Running install for module 'JSON::Parse'
Running make for B/BK/BKB/JSON-Parse-0.48.tar.gz
CPAN: Digest::SHA loaded ok (v5.86)
CPAN: Compress::Zlib loaded ok (v2.068)
Checksum for /root/.cpan/sources/authors/id/B/BK/BKB/JSON-Parse-0.48.tar.gz ok
Scanning cache /root/.cpan/build for sizes
............................................................................DONE
JSON-Parse-0.48/
JSON-Parse-0.48/unicode.c
JSON-Parse-0.48/examples/
JSON-Parse-0.48/t/
JSON-Parse-0.48/errors.c
JSON-Parse-0.48/lib/
JSON-Parse-0.48/utf8-byte-one.c
JSON-Parse-0.48/json-entry-points.c
JSON-Parse-0.48/json-common.c
JSON-Parse-0.48/json-perl.c
JSON-Parse-0.48/MANIFEST
JSON-Parse-0.48/MANIFEST.SKIP
JSON-Parse-0.48/typemap
JSON-Parse-0.48/utf8-next-byte.c
JSON-Parse-0.48/script/
JSON-Parse-0.48/unicode.h
JSON-Parse-0.48/json-whitespace.c
JSON-Parse-0.48/Json3.xs
JSON-Parse-0.48/Makefile.PL
JSON-Parse-0.48/README
JSON-Parse-0.48/Changes
JSON-Parse-0.48/META.yml
JSON-Parse-0.48/META.json
JSON-Parse-0.48/script/validjson
JSON-Parse-0.48/lib/JSON/
JSON-Parse-0.48/lib/JSON/Tokenize.pod
JSON-Parse-0.48/lib/JSON/Parse.pm
JSON-Parse-0.48/lib/JSON/Tokenize.pm
JSON-Parse-0.48/lib/JSON/Parse.pod
JSON-Parse-0.48/t/collision.t
JSON-Parse-0.48/t/whitespace.t
JSON-Parse-0.48/t/test.json
JSON-Parse-0.48/t/syntax.t
JSON-Parse-0.48/t/valid-json.t
JSON-Parse-0.48/t/numbers.t
JSON-Parse-0.48/t/unicode.t
JSON-Parse-0.48/t/perl-monks-1165399.t
JSON-Parse-0.48/t/array.t
JSON-Parse-0.48/t/syntax-error-1.json
JSON-Parse-0.48/t/kolmorogov42-1.t
JSON-Parse-0.48/t/object.t
JSON-Parse-0.48/t/utf8.t
JSON-Parse-0.48/t/Json3.t
JSON-Parse-0.48/t/test-empty-string.t
JSON-Parse-0.48/t/read-file.t
JSON-Parse-0.48/t/rfc7159.t
JSON-Parse-0.48/t/JSON-Parse.t
JSON-Parse-0.48/examples/assert.pl
JSON-Parse-0.48/examples/sasori.pl
JSON-Parse-0.48/examples/tokenize-synopsis.pl
JSON-Parse-0.48/examples/bad-utf8.pl
JSON-Parse-0.48/examples/kani.pl
JSON-Parse-0.48/examples/true-subs.pl
JSON-Parse-0.48/examples/long-number.pl
JSON-Parse-0.48/examples/synopsis.pl
JSON-Parse-0.48/examples/collide.pl
JSON-Parse-0.48/examples/array.pl
JSON-Parse-0.48/examples/key-collision.pl
JSON-Parse-0.48/examples/first-bit.pl
JSON-Parse-0.48/examples/json-tiny-round-trip-demo.pl
JSON-Parse-0.48/examples/chr.pl
JSON-Parse-0.48/examples/bad-utf8.txt
JSON-Parse-0.48/examples/ebi.pl
JSON-Parse-0.48/examples/hash.pl
CPAN: File::Temp loaded ok (v0.2304)
CPAN: YAML loaded ok (v0.88)
CPAN.pm: Going to build B/BK/BKB/JSON-Parse-0.48.tar.gz
Checking if your kit is complete...
Looks good
Warning: Perl version 5.008009 or higher required. We run 5.008008.
JSON::PP 2.27103 is not available
at /usr/local/share/perl/5.8.8/CPAN/Meta/Converter.pm line 57.
at /usr/local/share/perl/5.8.8/ExtUtils/MM_Any.pm line 831.
Generating a Unix-style Makefile
Writing Makefile for JSON::Parse
Writing MYMETA.yml and MYMETA.json
cp lib/JSON/Parse.pod blib/lib/JSON/Parse.pod
cp lib/JSON/Tokenize.pm blib/lib/JSON/Tokenize.pm
cp lib/JSON/Tokenize.pod blib/lib/JSON/Tokenize.pod
cp lib/JSON/Parse.pm blib/lib/JSON/Parse.pm
Running Mkbootstrap for JSON::Parse ()
chmod 644 Parse.bs
/usr/bin/perl /usr/local/share/perl/5.8.8/ExtUtils/xsubpp -typemap /usr/share/perl/5.8/ExtUtils/typemap -typemap typemap Json3.xs
> Json3.xsc && mv Json3.xsc Json3.c
cc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.48\" -DXS_VERSION=\"0.48\" -fPIC "-I/usr/lib/perl/5.8/CORE" Json3.c
rm -f blib/arch/auto/JSON/Parse/Parse.so
cc -shared -L/usr/local/lib Json3.o -o blib/arch/auto/JSON/Parse/Parse.so \
\
chmod 755 blib/arch/auto/JSON/Parse/Parse.so
/usr/bin/perl -MExtUtils::Command::MM -e 'cp_nonempty' -- Parse.bs blib/arch/auto/JSON/Parse/Parse.bs 644
cp script/validjson blib/script/validjson
/usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/validjson
Manifying blib/man3/JSON::Parse.3pm
Manifying blib/man3/JSON::Tokenize.3pm
BKB/JSON-Parse-0.48.tar.gz
/usr/bin/make -- OK
Running make test
Running Mkbootstrap for JSON::Parse ()
chmod 644 Parse.bs
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'b
lib/lib', 'blib/arch')" t/*.t
t/array.t ............... ok
t/collision.t ........... ok
t/JSON-Parse.t .......... ok
t/Json3.t ............... ok
t/kolmorogov42-1.t ...... ok
t/numbers.t ............. 1/? Attempt to free unreferenced scalar: SV 0x814ebe0, Perl interpreter: 0x814e008 during global destructi
on.
t/numbers.t ............. ok
t/object.t .............. ok
t/perl-monks-1165399.t .. 1/? Use of uninitialized value in undef operator at t/perl-monks-1165399.t line 38.
t/perl-monks-1165399.t .. ok
t/read-file.t ........... ok
t/rfc7159.t ............. ok
t/syntax.t .............. ok
t/test-empty-string.t ... ok
t/unicode.t ............. ok
t/utf8.t ................ ok
t/valid-json.t .......... All 5 subtests passed
t/whitespace.t .......... ok
Test Summary Report
-------------------
t/valid-json.t (Wstat: 11 Tests: 5 Failed: 0)
Non-zero wait status: 11
Parse errors: No plan found in TAP output
Files=16, Tests=277, 0 wallclock secs ( 0.05 usr 0.01 sys + 0.25 cusr 0.04 csys = 0.35 CPU)
Result: FAIL
Failed 1/16 test programs. 0/277 subtests failed.
make: *** [test_dynamic] Error 255
BKB/JSON-Parse-0.48.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports BKB/JSON-Parse-0.48.tar.gz
Running make install
make test had returned bad status, won't install without force
Failed during this command:
BKB/JSON-Parse-0.48.tar.gz : make_test NO
Like I said, it's an old Debian Etch server which is running an old version of cpan as well:
# cpan -v
/usr/bin/cpan script version 1.9, CPAN.pm version 1.9205
Can anyone offer any tips?
Your errors include this:
Warning: Perl version 5.008009 or higher required. We run 5.008008.
The current version of JSON::Parse (0.48) requires a more recent version of Perl than the one you have.
This minimum version requirement was added in version 0.25. But looking at the CPAN testers results, it seems that this was just documenting a problem that had been around for some time. You might be able to install version 0.18, but you would be far better advised to upgrade to a version of Debian with a newer version of Perl installed.
If JSON::Parse isn't a dependency for anything you want. You can just use JSON to do the same thing.
#!/usr/bin/perl
use strict;
use warnings;
use JSON;
my $jsonString = "{\"foo\":\"bar\"}";
my $hash = decode_json($jsonString);
print ${$hash}{"foo"} . "\n";

MySQL upgrade fails on Ubuntu 16.04

I have Ubuntu 16.04 running (clean install - no upgrade). MySQL is running fine - but I get this error when I try to update MySQL:
apt-get install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mysql-server-5.7 (5.7.16-0ubuntu0.16.04.1) ...
Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
Checking system database.
mysql.columns_priv OK
mysql.db OK
mysql.engine_cost OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.gtid_executed OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.server_cost OK
mysql.servers OK
mysql.slave_master_info OK
mysql.slave_relay_log_info OK
mysql.slave_worker_info OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
The sys schema is already up to date (version 1.5.1).
Checking databases.
ALL DATABASES RETURNED OK
Error occurred: Error during call to mysql_check.
mysql_upgrade failed with exit status 4
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Although it's running, I dont like errors. Do you guys have any idea how to fix this issue?
Running dpkg -l | grep mysql gives:
dpkg -l | grep mysql
ii libdbd-mysql-perl 4.033-1ubuntu0.1 amd64 Perl5 database interface to the MySQL database
ii libmysqlclient20:amd64 5.7.16-0ubuntu0.16.04.1 amd64 MySQL database client library
ii mysql-client 5.7.16-0ubuntu0.16.04.1 all MySQL database client (metapackage depending on the latest version)
ii mysql-client-5.7 5.7.16-0ubuntu0.16.04.1 amd64 MySQL database client binaries
ii mysql-client-core-5.7 5.7.16-0ubuntu0.16.04.1 amd64 MySQL database core client binaries
ii mysql-common 5.7.16-0ubuntu0.16.04.1 all MySQL database common files, e.g. /etc/mysql/my.cnf
iU mysql-server 5.7.16-0ubuntu0.16.04.1 all MySQL database server (metapackage depending on the latest version)
iF mysql-server-5.7 5.7.16-0ubuntu0.16.04.1 amd64 MySQL database server binaries and system database setup
ii mysql-server-core-5.7 5.7.16-0ubuntu0.16.04.1 amd64 MySQL database server binaries
ii php-mysql 1:7.0+45+deb.sury.org~xenial+1 all MySQL module for PHP [default]
ii php5.6-mysql 5.6.27-1+deb.sury.org~xenial+1 amd64 MySQL module for PHP
ii php7.0-mysql 7.0.12-1+deb.sury.org~xenial+1 amd64 MySQL module for PHP
Thanks
I've run into this myself and I believe it has to do with how the upgrade process stops/starts/restarts MySQL.
Here is my workaround that I do after an attempted upgrade of MySQL fails.
Start MySQL normally, typically "service mysql start" as root.
As root execute "mysql_upgrade --defaults-file=/etc/mysql/debian.cnf". Hopefully it should complete with no errors or indicate that MySQL is already upgraded.
Edit the file "/var/lib/dpkg/info/mysql-server-5.7.postinst" with your favorite editor. Around line 320 (depending on version) find the line "mysql_upgrade --defaults-file=/etc/mysql/debian.cnf || result=$?". Comment that line out (prepend line with '#'), if should look like "#mysql_upgrade --defaults-file=/etc/mysql/debian.cnf || result=$?". Save the file and exit from the editor.
Rerun the upgrade process and it should indicate that MySQL is now upgraded.
At some point I will dig further to see why the "mysql_upgrade ..." invocation fails during the upgrade but not alone from the command line. But I've not gone through a few iterations of upgrades without issue using this method.
Hope this helps.
'Grip
I've had this issue before, the root cause for this issue was changing the db configuration.
I changed lower_case_table_names = 1 and set the value to one, and when I tried to upgrade it failed with the error you shared in your question.
To solve it, I simple set the value back to 0, restarted the db, and the upgrade worked well for me.
First edit the config:
sudo nano /etc/mysql/my.cnf
change this line:
lower_case_table_names = 0
restart the database
sudo /etc/init.d/mysql restart
Then run the upgrade command
NOTE: This is for upgrading MySQL with "mysql_secure_installation" fix.
Had problems with upgrading MySQL Server 5.7 in Ubuntu 16.04 and I finally located my problem. I enabled "mysql_secure_installation" during my first installation that causes the upgrade script to fail due to password creation error (unsatisfied special character requirement on the automatically generated password in the upgrade script).
While running 'sudo apt upgrade' or 'sudo apt install -f', the error can be traced using this command:
tail -f /var/log/mysql/error.log
In my case, the log shows:
[ERROR] 1819 Your password does not satisfy the current policy
requirements
To fix this, login to mysql and temporarily disable MySQL's validate password plugin:
mysql -u root -p -h 127.0.0.1
mysql> uninstall plugin validate_password;
mysql> exit
make sure to stop the previous upgrade/install and rerun the upgrade/install. Once done, login back to mysql and enable MySQL's validate password plugin;
mysql -u root -p -h 127.0.0.1
mysql> install plugin validate_password SONAME 'validate_password.so';
mysql> exit
always check /var/log/mysqld.log first

libmemcached path?

Trying to follow these instructions:
(http://dev.mysql.com/doc/refman/5.1/en/ha-memcached-interfaces-mysqludf.html)
shell> tar zxf memcached_functions_mysql-1.1.tar.gz
shell> cd memcached_functions_mysql-1.1
shell> # If memcached library is not found, set LDFLAGS=-Llibrary_directory before next command.
shell> ./configure --with-mysql=/usr/local/mysql/bin/mysql_config
When I run:
sudo ./configure --with-mysql=/usr/lib64/mysql/mysql_config
I get this at the end of output:
checking for libmemcached >= 0.17... configure: error: libmemcached not found
So I tried to set LDFLAGS as instructed above but don't know the "library_directory" path.
How can I find it?
Update 1: As per response below. libmemcached IS installed:
sudo yum install libmemcached
Loaded plugins: downloadonly, replace, rhnplugin, security
epel | 3.7 kB 00:00
ius | 2.2 kB 00:00
rackspace-rhel-x86_64-server-5.6.z-common | 871 B 00:00
rhel-x86_64-server-5.6.z | 1.3 kB 00:00
Excluding Packages in global exclude list
Finished
Setting up Install Process
Package libmemcached-0.31-1.1.el5.x86_64 already installed and latest version
Nothing to do
Thanks
You're missing libmemcached-devel, it probably needs headers too.