HI Folks I have installed mariadb on a raspberry pi using pip3 and a wheel package. I don't have internet access on the pi so had to do a pip download with dependencies on another machine and copy it across. When I do a 'pip3 show mariadb' command, I get the following:
Version: 1.0.7
Summary: Python MariaDB extension
Home-page: https://www.github.com/mariadb-corporation/mariadb-connector-python
Author: Georg Richter
Author-email: None
License: LGPL 2.1
Location: /home/pi/.local/lib/python3.7/site-packages
Requires:
Required-by:
From this I assume that it installed ok but I can't seem to run it using the 'mysql -u root -p' command. I get a 'mysql: command not found' error. Do I have to edit my PATH and if so how can I find the path to the application? I have done a full file search for 'mysql' but only get a couple of files that I know what they are, but they are not the main application.
This is how I installed mariadb:
pi#PTGM2:~/mariadb-deps $ pip3 install mariadb-1.0.7-cp37-cp37m-linux_armv7l.whl -f ./ --no-index --no-deps
Looking in links: ./
Processing ./mariadb-1.0.7-cp37-cp37m-linux_armv7l.whl
Installing collected packages: mariadb
Successfully installed mariadb-1.0.7
From a file I created like this :
pi#PiMainServer:~ $ pip download mariadb -d '/home/pi/mariadb-deps'
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting mariadb
Downloading https://www.piwheels.org/simple/mariadb/mariadb-1.0.7-cp37-cp37m-l inux_armv7l.whl (235 kB)
|████████████████████████████████| 235 kB 100 kB/s
Saved ./mariadb-deps/mariadb-1.0.7-cp37-cp37m-linux_armv7l.whl
Successfully downloaded mariadb
It seems I was just installing the connector, so I have managed to get the mariadb-server deb file, but when I try to install it, I get an error that it requires mariadb-server-10.3! I thought I was installing mariadb-server-10.3???
This is what I get:
pi#PTGM2:/var/cache/apt/archives $ sudo dpkg -i mariadb-server_1%3a10.3.29-0+deb10u1_all.deb
(Reading database ... 160964 files and directories currently installed.)
Preparing to unpack mariadb-server_1%3a10.3.29-0+deb10u1_all.deb ...
Unpacking mariadb-server (1:10.3.29-0+deb10u1) over (1:10.3.29-0+deb10u1) ...
dpkg: dependency problems prevent configuration of mariadb-server:
mariadb-server depends on mariadb-server-10.3 (>= 1:10.3.29-0+deb10u1); however:
Package mariadb-server-10.3 is not installed.
dpkg: error processing package mariadb-server (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mariadb-server
Ok, now I have installed mysql-common, mariadb-common and the connector, but I still get an error:
pi#PTGM2:/var/cache/apt/archives $ sudo dpkg -i mariadb-common_1%3a10.3.29-0+deb 10u1_all.deb
Selecting previously unselected package mariadb-common.
(Reading database ... 160988 files and directories currently installed.)
Preparing to unpack mariadb-common_1%3a10.3.29-0+deb10u1_all.deb ...
Unpacking mariadb-common (1:10.3.29-0+deb10u1) ...
Setting up mariadb-common (1:10.3.29-0+deb10u1) ...
update-alternatives: using /etc/mysql/mariadb.cnf to provide /etc/mysql/my.cnf ( my.cnf) in auto mode
pi#PTGM2:/var/cache/apt/archives $ sudo dpkg -i libmariadb3_1%3a10.3.29-0+deb10u 1_armhf.deb
(Reading database ... 160993 files and directories currently installed.)
Preparing to unpack libmariadb3_1%3a10.3.29-0+deb10u1_armhf.deb ...
Unpacking libmariadb3:armhf (1:10.3.29-0+deb10u1) over (1:10.3.29-0+deb10u1) ...
Setting up libmariadb3:armhf (1:10.3.29-0+deb10u1) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
pi#PTGM2:/var/cache/apt/archives $ sudo dpkg -i mariadb-server_1%3a10.3.29-0+deb 10u1_all.deb
(Reading database ... 160993 files and directories currently installed.)
Preparing to unpack mariadb-server_1%3a10.3.29-0+deb10u1_all.deb ...
Unpacking mariadb-server (1:10.3.29-0+deb10u1) over (1:10.3.29-0+deb10u1) ...
dpkg: dependency problems prevent configuration of mariadb-server:
mariadb-server depends on mariadb-server-10.3 (>= 1:10.3.29-0+deb10u1); however :
Package mariadb-server-10.3 is not installed.
dpkg: error processing package mariadb-server (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mariadb-server
I am trying to install Mysql Community Server version5.6.40 on my Centos7 VM.
During the installation i have met below problems:
1)
[root#Mysql_Server scripts]# ./mysql_install_db.sh --user=mysql --basedir=/application/mysql --datadir=/application/mysql/data
-bash: ./mysql_install_db.sh: Permission denied
[root#Mysql_Server support-files]# /etc/init.d/mysqld start
-bash: /etc/init.d/mysqld: Permission denied
i have use chmod a+x filename to assign the execute rights but i just want to know why those files lacks of execution rights. //i download the mysql installation tar file and extract with root privilege
2)while i was running the mysql_install_db.sh
[root#Mysql_Server scripts]# ./mysql_install_db.sh --user=mysql --basedir=/application/mysql --datadir=/application/mysql/data
FATAL ERROR: Could not find my_print_defaults
The following directories were searched:
/application/mysql/bin
/application/mysql/extra
If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.
If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.
i tried follow steps to find out what the possible reason for causing this issue:
find / my_print_defaults
find: ‘my_print_defaults’: No such file or directory
and
ls /application/mysql/
[root#Mysql_Server scripts]# ls /application/mysql/
BUILD dbug libmysqld README support-files
client Docs libservices regex tests
cmake Doxyfile-perfschema man scripts unittest
CMakeLists.txt extra mysql-test sql VERSION
cmd-line-utils include mysys sql-bench vio
config.h.cmake INSTALL mysys_ssl sql-common win
configure.cmake libevent packaging storage zlib
COPYING libmysql plugin strings
no bin and extra directory were created.
so i was wondering if it was caused by lacking of gcc gcc-c++ because my centos7 installation chose minimal install.
or maybe it was caused by lacking of execution rights result the shell files did run correctly.
attached:below whole operations for better trouble shooting
[root#Mysql_Server ~]# yum install wget -y
[root#Mysql_Server ~]# wget https://cdn.mysql.com/archives/mysql-5.6/mysql-5.6.40.tar.gz
[root#Mysql_Server ~]# tar -xf mysql-5.6.40.tar.gz
[root#Mysql_Server ~]# mkdir /application
[root#Mysql_Server ~]# mv mysql-5.6.40 /application/
[root#Mysql_Server ~]# ln -s /application/mysql-5.6.40/ /application/mysql
[root#Mysql_Server ~]# cd /application/mysql/support-files/
[root#Mysql_Server support-files]# cp my-default.cnf.sh /etc/my.cnf
[root#Mysql_Server support-files]# cp mysql.server.sh /etc/init.d/mysqld
[root#Mysql_Server support-files]# cd /application/mysql/scripts/
[root#Mysql_Server scripts]# useradd mysql -s /sbin/nologin -M
[root#Mysql_Server scripts]# chmod a+x mysql_install_db.sh
[root#Mysql_Server scripts]# ./mysql_install_db.sh --user=mysql --basedir=/application/mysql --datadir=/application/mysql/data
It is a fatal mistake by misunderstanding between the source code and binary package.
Since i downloaded the source code which can not be run directly without encoding and packaging.
Thanks again for #danblack's reminds!
I've successfully run mysql_community_server on centos7 now.(using the binary package installed).
now i am going to install mysql by using the source code.
I am trying to reinstall mysql-server on my wsl Ubuntu 18.04.
(I have MySQL server on Windows 10, but on port 3307. Idk if this matters but just in case!)
I couldn't sudo service mysql start nor sudo /etc/init.d/mysql start and it returned
No directory, logging in with HOME=/
mkdir: cannot create directory ‘//.cache’: Permission denied
-su: 19: /etc/profile.d/wsl-integration.sh: cannot create //.cache/wslu/integration: Directory nonexistent [Failed]
I googled about reinstalling mysql in Ubuntu and followed the following procedure.
- https://github.com/microsoft/WSL/issues/1761
sudo su
apt-get remove --purge 'mysql*'
apt-get autoremove
apt-get autoclean
rm -f /etc/mysql /var/lib/mysql
apt-get install mysql-server
But while trying apt-get install mysql-server I got the error below.
invoke-rc.d: could not determine current runlevel
* Stopping MySQL database server mysqld [ OK ]
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
Cannot open /proc/net/unix: No such file or directory
Cannot stat file /proc/1/fd/5: Operation not permitted
Cannot stat file /proc/1/fd/10: Operation not permitted
Cannot stat file /proc/1/fd/6: Operation not permitted
Cannot stat file /proc/5/fd/7: Operation not permitted
Cannot stat file /proc/5/fd/10: Operation not permitted
Cannot stat file /proc/5/fd/5: Operation not permitted
Cannot stat file /proc/843/fd/7: Operation not permitted
Cannot stat file /proc/843/fd/10: Operation not permitted
Cannot stat file /proc/843/fd/5: Operation not permitted
dpkg: error processing package mysql-server-5.7 (--configure):
installed mysql-server-5.7 package post-installation script subprocess 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.
I've been googling Cannot open /proc/net/unix: No such file or directory and invoke-rc.d: could not determine current runlevel problems but could not find the right solution for this issue.
I really appreciate if you could give me some advice on this. Thanks!
When I looked into the log file /var/log/mysql/error.log I found
[ERROR] [MY-012585] [InnoDB] Linux Native AIO interface is not supported on this platform. Please check your OS documentation and install appropriate binary of InnoDB.
I disabled the use of Native AIO by creating a new config file /etc/mysql/conf.d/no_native_aio.conf:
[mysqld]
innodb_use_native_aio = 0
Then I was able to start the databse server like so:
sudo service mysql start
I also had to run
sudo mysql_secure_installation
to set the password for the root user.
and I had to trick dpkg into believing that postinstall script had run
successfully by:
adding exit 0 as the second line in /var/lib/dpkg/info/mysql-server-8.0.postinst
running sudo dpkg --configure -a
removing the exit 0 from /var/lib/dpkg/info/mysql-server-8.0.postinst
This will be a WSL1 vs WSL2 issue. The /proc directory isn't fully populated with WSL1. To check your version run (from powershell) wsl -l -v. If it doesn't give you any version info, then you're on WSL1.
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?
I have a VPS and it runs on Debian GNU/Linux 8 (jessie). I try to install Apache, PHP, and MySQL on it. I get the below error:
The following packages have unmet dependencies:
mysql-server : Depends: mysql-server-5.5 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
When I run apt-get -f install, i get below error:
Preconfiguring packages ...
(Reading database ... 39521 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.5_5.5.52-0+deb8u1_amd64.deb ...
Aborting downgrade from (at least) 10.0 to 5.5.
If are sure you want to downgrade to 5.5, remove the file
/var/lib/mysql/debian-*.flag and try installing again.
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.5_5.5.52-0+deb8u1_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)
I have basic knowledge of Linux, so any suggestion or help. I search online and try to uninstall and remove and reinstall MySQL... but no luck.
from you error output i did a quick apt-cache search to see the version numbers of mysql-server
from what i seen you might have installed mariadb-server-10.0 installed instead of mysql-server
do a dpkg -l | grep mysql and look at the results. you could also try dpkg -l | grep server and look at that output also.
ADDED COMMENT-
did you remove the file that it's asking you to do?
if you need to have both db-servers running i would follow along with this
https://superuser.com/questions/1029228/mysql-and-mariadb-instances-on-the-same-server
if you don't need both dbs, then i would apt-get remove mariadb-.. from your server and then apt-get -f install to get mysql-server installed