I have to change my databasefrom MySQL to postgreSQL in django. But postgreSQL is not installing .
Error while installing postgreSQL using commands-
sudo apt-get update && sudo apt-get upgrade
sudo apt-get purge postgresql*
sudo apt-get -f install
sudo apt-get install postgresql
At terminal-
(jango)dc#dc-comp-4:~/website$ sudo apt-get install postgresql
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
postgresql : Depends: postgresql-9.3 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
but its not working.how can i do this.and what changes i have to made. Plz help
aptitude might be able to resolve this issue. It's a more sophisticated dependency management tool than apt-get.
You may install it with apt-get:
sudo apt-get install aptitude
You may use aptitude to install postgresql
sudo aptitude install postgresql-9.3
If aptitude encounters any problems it automatically devises a possible solution to install this package. Be aware that aptitude might suggest remove conflicting packages. So if you get prompted by aptitude please read the prompt carefully.
Related
i fully deleted mysql* from my Ubuntu focal. Then i reinstalled all with this commands:
sudo -i
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.11-1_all.deb
dpkg -i mysql-apt-config_0.8.11-1_all.deb
apt update
apt-get -f install -o Dpkg::Options::="--force-overwrite"
apt update
apt-get install mysql-server
And then i get this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mysql-server : Depends: mysql-server-8.0 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
This question from stackoverflow DOES NOT WORK FOR ME unable to install mysql on ubuntu 16.04
I have installed MySQL APT Repository on my OS, then tried to execute the following command:
sudo apt update
sudo apt install mysql-server
It shows me these errors:
$ sudo apt install mysqL-server
Reading package lists.. Done
Building dependency tree.. Done
Reading state information.. Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mariadb-client-core-10.5 : Conflicts: virtual-mysql-client-core
mariadb-server-core-10.5 : Conflicts: virtual-mysql-server-core
E: Error, pkgProblemResolver: :Resolve generated breaks, this may be caused by held
packages
I have never installed mariadb on my device. Why is this error reported? I need to install mysql server on my device.
Please help me.
remove mariadb with
apt remove mariadb-common
then install mysql did it for me
By wrong uninstalling MariaDB, I've lost working instance of MySQL and MariaDB in my Ubuntu 16.04 system...
I've broken the dependencies so much, that I can not uninstall or install MySQL or MariaDB, using apt-get, or dpkg...
All the following commands failed:
apt-get [install -f] [update] [remove] [purge] [autorove] [clean] [check]
and options with dpkg such as:
dpkg --remove --force-remove-reinstreq mysql
also don't help me.
Manually downloading the package and attempting to install from a local file did not help.
For each installation, uninstallation or other attempt, I get almost the same result:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
mariadb-client : Depends: mariadb-client-10.0 (>= 10.0.34-0ubuntu0.16.04.1) but it is not installed
mariadb-server-10.0 : PreDepends: mariadb-common (>= 10.0.34-0ubuntu0.16.04.1) but it is not installed
Depends: mariadb-client-10.0 (>= 10.0.34-0ubuntu0.16.04.1) but it is not installed
Breaks: mysql-server
mariadb-server-core-10.0 : Depends: mariadb-common (>= 10.0.34-0ubuntu0.16.04.1) but it is not installed
mysql-server : Depends: mysql-community-server (= 5.7.22-1ubuntu16.04) but it is not installed
E: Unmet dependencies. Try using -f.
Is there any different way to permanently remove any traces and remnants of MySQL and MariaDB from the operating system, so that I can reinstall MySQL itself?
I need to working with MySQL, but I can't reinstall the operating system.
Please help me.
God exists! :D
The problem was solved by entering:
sudo apt-get -f install
without any other parameters
and later displaying all packages via:
sudo dpkg -l | grep mariadb
sudo dpkg -l | grep mysql
and removing problematic packages in the right order:
sudo apt-get --purge autoremove package_name
After the complete removal of all problematic packages, I could re-install MySQL without any problems...
Thank you #YuriLachin for your help.
It is probably better to address the question to serverfault.com.
Run:
dpkg --audit
to find what is broken.
Then run:
dpkg --list|grep -i mysql
and
dpkg --list|grep -i mariadb
Look at the first (status) column and, optionally, inspect detailed status for some of packages with:
dpkg-info -s <name-of-package>
Then you can try to remove found mysql/mariadb related packages with
dpkg -remove --force-remove-reinstreq <package-list>
As a way around you can always run mysq in docker container without mysql being installed
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed last year.
Improve this question
I have mysql 5.5 installed in my system and i want to install new version ie. mysql 5.7 , so i am struggling to uninstall the older version. when i will try to install 5.7 ,it is installing 5.5. so i need help ...
here is the command i executed:-
sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.5 mysql-client-core-5.5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'mysql-client' is not installed, so not removed
Package 'mysql-client-core-5.5' is not installed, so not removed
Package 'mysql-common' is not installed, so not removed
Package 'mysql-server' is not installed, so not removed
Package 'mysql-server-core-5.5' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 254 not upgraded.
** I don't understand why 254 was not upgraded
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 254 not upgraded.
sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
$ mysql --version(i jsust tyied to check the version)
The program 'mysql' can be found in the following packages:
* mysql-client-core-5.5
* mariadb-client-core-5.5
* mysql-client-core-5.6
* percona-xtradb-cluster-client-5.5
Try: sudo apt-get install <selected package>
sudo apt-get install mysql-server
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libdbd-mysql-perl libdbi-perl libmysqlclient18 libterm-readkey-perl
mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server-5.5
mysql-server-core-5.5
Suggested packages:
libmldbm-perl libnet-daemon-perl libplrpc-perl libsql-statement-perl tinyca
mailx
Recommended packages:
libhtml-template-perl
The following NEW packages will be installed:
libdbd-mysql-perl libdbi-perl libmysqlclient18 libterm-readkey-perl
mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server
mysql-server-5.5 mysql-server-core-5.5
0 upgraded, 10 newly installed, 0 to remove and 254 not upgraded.
Need to get 0 B/9,257 kB of archives.
After this operation, 96.4 MB of additional disk space will be used.
Do you want to continue? [Y/n]
******
its installing the previous version instead of new version.
so please help me
try this:
sudo apt-get purge mysql-server
This worked for me in Linux mint 20
sudo apt-get purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
apt automatically installs the latest version available in the added repositories.
to see all the available versions in your enabled repositories, run
apt-cache policy mysql-server
if the version you want to install is not listed in the output, then you might need to add extra repositories.
Coming to 254 not upgraded part, it just means that updates for 254 packages are available in the repositories.
You can install those updates using
sudo apt-get upgrade
Please try using this command to remove MySQL completely from your current Linux system including your databases, settings and everything else.
sudo apt-get purge mysql
Hopefully I didn't mistyped :p
Let me know if it worked for you.
Try uninstalling it from software manager and restart the system, it worked for me.
Execute the following command :
# rpm -qa | grep mysql
It will list all installed mysql packages on your system. Eg: mysql-libs-5.1.73-3.el6_5.x86_64
now execute the command:
# yum remove <name displayed in above step-1>
Eg: yum remove mysql-libs-5.1.73-3.el6_5.x86_64
I would like to install MySql 5.7 on Debian 7 Wheezy. I put :
deb http://repo.mysql.com/apt/debian/ wheezy mysql-5.7
in file:
/etc/apt/sources.list.d/mysql.list
Next I run commands:
sudo apt-get update
sudo apt-get upgrade
And tried install package:
sudo apt-get install mysql-server-5.7
I got an error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'mysql-community-server' instead of 'mysql-server-5.7'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mysql-community-server : Depends: mysql-common (= 5.7.11-1debian7) but 5.5.47-0+deb7u1 is to be installed
Depends: mysql-client (= 5.7.11-1debian7)
E: Unable to correct problems, you have held broken packages.
Do you have any ideas to resolve this problem?
I also tried:
Note, selecting 'mysql-community-server' instead of 'mysql-server-5.7'
But it's not the solution of the problem.
I stumbled upon this post and can confirm simply changing the priority of your cache by downloading the .deb package directly from MySQL Downloads
Using the command line:
$ cd /usr/src && sudo wget http://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb
Please note: by convension the /src directory on linux exists for source code to live before being compiled - I believe the deb package above therefore belongs here.
This works for Debian/Wheezy.
$ sudo dpkg -i http://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb
Once this you have gone through the steps, you simply hit Ok, and then proceed to install mysql-server like normal:
$ sudo apt-update
$ sudo apt-get install mysql-server
For me, this resulted in the following:
[info] MySQL Community Server 5.7.14 is started.
Setting up mysql-server (5.7.14-1debian7) ...
Further reading, if you ever want to remove this package, you can do so:
$ cd /usr/src && sudo dpkg --remove http://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb
As of 2020 with Debian Wheezy 7.11 the answer doesn't work anymore. I had to change a few things and thought it might be useful to share the result:
Install mysql-apt-config_0.8.10-1_all.deb (Version 0.8.15-1_all won't work: dpkg can't handle the "control.tar.xz" it contains.)
cd /usr/src
sudo wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb
This will create the necessary /etc/apt/sources.list.d/mysql.list file.
sudo apt-get update
sudo apt-get install mysql-server
Thanks goes to David Kehr from where I got the working mysql-apt-config version.
You don't need to specify the version in the apt-get command, just type :
sudo apt-get install mysql-server
After the install, you can type the following command to check mysql version
aptitude show mysql-server
On my machine I have the following result :
...
VersionĀ : 5.7.13-1debian7
...