在 16.04 上安装 mySQL 服务器时出现问题

在 16.04 上安装 mySQL 服务器时出现问题

我在 16.04 上安装 mySQL 服务器时遇到问题。

我试过:

sudo apt-get install mysql-server

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.
 mysql-server : Depends: mysql-server-5.7 but it is not going to be installed
 openjdk-9-source : Depends: openjdk-9-jdk (>= 9~b114-0ubuntu1)
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

然后我看了本指南:

https://www.cyberciti.biz/faq/howto-install-mysql-on-ubuntu-linux-16-04/

第一步,它要求您输入:

$ sudo apt update
$ sudo apt upgrade

第一个命令有效,而第二个命令没有出现与上次类似的错误:

sudo apt upgrade

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.
 openjdk-9-source : Depends: openjdk-9-jdk (>= 9~b114-0ubuntu1)
E: Unmet dependencies. Try using -f.

jdk-9 似乎存在问题,但我不知道如何修复。

谢谢

sudo apt-get -f install

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.10.0-28 linux-headers-4.10.0-28-generic
  linux-headers-4.10.0-37 linux-headers-4.10.0-37-generic
  linux-image-4.10.0-28-generic linux-image-4.10.0-37-generic
  linux-image-extra-4.10.0-28-generic linux-image-extra-4.10.0-37-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  openjdk-9-jdk
Suggested packages:
  openjdk-9-demo visualvm
The following NEW packages will be installed
  openjdk-9-jdk
0 to upgrade, 1 to newly install, 0 to remove and 23 not to upgrade.
30 not fully installed or removed.
Need to get 0 B/16.6 kB of archives.
After this operation, 58.4 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 285767 files and directories currently installed.)
Preparing to unpack .../openjdk-9-jdk_9~b114-0ubuntu1_amd64.deb ...
Unpacking openjdk-9-jdk:amd64 (9~b114-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/openjdk-9-jdk_9~b114-0ubuntu1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/jvm/java-9-openjdk-amd64/include/linux/jawt_md.h', which is also in package openjdk-9-jdk-headless:amd64 9~b114-0ubuntu1
Errors were encountered while processing:
 /var/cache/apt/archives/openjdk-9-jdk_9~b114-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo dpkg --configure -a

Setting up libgnome2-common (2.32.1-5ubuntu1) ...
Setting up libpthread-stubs0-dev:amd64 (0.3-4) ...
Setting up libbonobo2-common (2.32.1-3) ...
Setting up xorg-sgml-doctools (1:1.11-1) ...
Setting up libgnomevfs2-common (1:2.24.4-6.1ubuntu1) ...
Setting up java-common (0.56ubuntu2) ...
Setting up x11proto-kb-dev (1.0.7-0ubuntu1) ...
Setting up xtrans-dev (1.3.5-1) ...
Setting up liborbit-2-0:amd64 (1:2.14.19-1build1) ...
Setting up libx11-doc (2:1.6.3-1ubuntu2) ...
dpkg: dependency problems prevent configuration of openjdk-9-source:
 openjdk-9-source depends on openjdk-9-jdk (>= 9~b114-0ubuntu1); however:
  Package openjdk-9-jdk:amd64 is not installed.

dpkg: error processing package openjdk-9-source (--configure):
 dependency problems - leaving unconfigured
Setting up fonts-dejavu-extra (2.35-1) ...
Setting up libatk-wrapper-java (0.33.3-6) ...
Setting up libgnomevfs2-0:amd64 (1:2.24.4-6.1ubuntu1) ...
Setting up x11proto-core-dev (7.0.31-1~ubuntu16.04.2) ...
Setting up libxau-dev:amd64 (1:1.0.8-1) ...
Setting up libbonobo2-0:amd64 (2.32.1-3) ...
Setting up libatk-wrapper-java-jni:amd64 (0.33.3-6) ...
Setting up libxdmcp-dev:amd64 (1:1.1.2-1.1) ...
Setting up libice-dev:amd64 (2:1.0.9-1) ...
Setting up libxcb1-dev:amd64 (1.11.1-1ubuntu1) ...
Setting up x11proto-input-dev (2.3.1-1) ...
Setting up libsm-dev:amd64 (2:1.2.2-1) ...
Setting up libgnome-2-0:amd64 (2.32.1-5ubuntu1) ...
Setting up libx11-dev:amd64 (2:1.6.3-1ubuntu2) ...
Setting up libxt-dev:amd64 (1:1.1.5-0ubuntu1) ...
Setting up openjdk-9-jre-headless:amd64 (9~b114-0ubuntu1) ...
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/rmid to provide /usr/bin/rmid (rmid) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/java to provide /usr/bin/java (java) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/keytool to provide /usr/bin/keytool (keytool) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jjs to provide /usr/bin/jjs (jjs) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/pack200 to provide /usr/bin/pack200 (pack200) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/rmiregistry to provide /usr/bin/rmiregistry (rmiregistry) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/unpack200 to provide /usr/bin/unpack200 (unpack200) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/orbd to provide /usr/bin/orbd (orbd) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/servertool to provide /usr/bin/servertool (servertool) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/tnameserv to provide /usr/bin/tnameserv (tnameserv) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/lib/jexec to provide /usr/bin/jexec (jexec) in auto mode
Setting up ca-certificates-java (20160321) ...
Adding debian:Izenpe.com.pem
Adding debian:AffirmTrust_Premium.pem
Adding debian:DST_ACES_CA_X6.pem
Adding debian:Certigna.pem
Adding debian:EE_Certification_Centre_Root_CA.pem
Adding debian:Swisscom_Root_EV_CA_2.pem
Adding debian:OISTE_WISeKey_Global_Root_GA_CA.pem
Adding debian:QuoVadis_Root_CA_2.pem
Adding debian:QuoVadis_Root_CA_3.pem
Adding debian:Amazon_Root_CA_4.pem
Adding debian:Comodo_AAA_Services_root.pem
Adding debian:TeliaSonera_Root_CA_v1.pem
Adding debian:Certum_Trusted_Network_CA_2.pem
Adding debian:Entrust.net_Premium_2048_Secure_Server_CA.pem
Adding debian:China_Internet_Network_Information_Center_EV_Certificates_Root.pem
Adding debian:GeoTrust_Universal_CA.pem
Adding debian:DigiCert_Assured_ID_Root_G3.pem
Adding debian:GeoTrust_Global_CA.pem
Adding debian:DigiCert_Trusted_Root_G4.pem
Adding debian:Go_Daddy_Class_2_CA.pem
Adding debian:Chambers_of_Commerce_Root_-_2008.pem
Adding debian:SecureSign_RootCA11.pem
Adding debian:TWCA_Global_Root_CA.pem
Adding debian:Camerfirma_Global_Chambersign_Root.pem
Adding debian:Amazon_Root_CA_2.pem
Adding debian:TUBITAK_Kamu_SM_SSL_Kok_Sertifikasi_-_Surum_1.pem
Adding debian:thawte_Primary_Root_CA_-_G3.pem
Adding debian:GeoTrust_Global_CA_2.pem
Adding debian:Cybertrust_Global_Root.pem
Adding debian:Hellenic_Academic_and_Research_Institutions_RootCA_2011.pem
Adding debian:ISRG_Root_X1.pem
Adding debian:OISTE_WISeKey_Global_Root_GB_CA.pem
Adding debian:T-TeleSec_GlobalRoot_Class_3.pem
Adding debian:CFCA_EV_ROOT.pem
Adding debian:Go_Daddy_Root_Certificate_Authority_-_G2.pem
Adding debian:Certum_Trusted_Network_CA.pem
Adding debian:Buypass_Class_2_Root_CA.pem
Adding debian:QuoVadis_Root_CA_3_G3.pem
Adding debian:Network_Solutions_Certificate_Authority.pem
Adding debian:AddTrust_External_Root.pem
Adding debian:CA_Disig_Root_R2.pem
Adding debian:D-TRUST_Root_Class_3_CA_2_EV_2009.pem
Adding debian:AddTrust_Qualified_Certificates_Root.pem
Adding debian:CA_Disig_Root_R1.pem
Adding debian:EC-ACC.pem
Adding debian:Sonera_Class_2_Root_CA.pem
Adding debian:Actalis_Authentication_Root_CA.pem
Adding debian:QuoVadis_Root_CA_2_G3.pem
Adding debian:XRamp_Global_CA_Root.pem
Adding debian:GlobalSign_Root_CA_-_R3.pem
Adding debian:DigiCert_Global_Root_G2.pem
Adding debian:QuoVadis_Root_CA_1_G3.pem
Adding debian:USERTrust_ECC_Certification_Authority.pem
Adding debian:Starfield_Services_Root_Certificate_Authority_-_G2.pem
Adding debian:Comodo_Trusted_Services_root.pem
Adding debian:Entrust_Root_Certification_Authority_-_EC1.pem
Adding debian:IdenTrust_Public_Sector_Root_CA_1.pem
Adding debian:VeriSign_Universal_Root_Certification_Authority.pem
Adding debian:ssl-cert-snakeoil.pem
Adding debian:certSIGN_ROOT_CA.pem
Adding debian:DigiCert_Global_Root_CA.pem
Adding debian:Security_Communication_EV_RootCA1.pem
Adding debian:GeoTrust_Primary_Certification_Authority_-_G3.pem
Adding debian:QuoVadis_Root_CA.pem
Adding debian:OpenTrust_Root_CA_G1.pem
Adding debian:Swisscom_Root_CA_1.pem
Adding debian:Hongkong_Post_Root_CA_1.pem
Adding debian:OpenTrust_Root_CA_G2.pem
Adding debian:AffirmTrust_Premium_ECC.pem
Adding debian:DigiCert_Assured_ID_Root_CA.pem
Adding debian:Comodo_Secure_Services_root.pem
Adding debian:GeoTrust_Universal_CA_2.pem
Adding debian:Certplus_Class_2_Primary_CA.pem
Adding debian:T-TeleSec_GlobalRoot_Class_2.pem
Adding debian:COMODO_RSA_Certification_Authority.pem
Adding debian:AddTrust_Public_Services_Root.pem
Adding debian:OpenTrust_Root_CA_G3.pem
Adding debian:DigiCert_Global_Root_G3.pem
Adding debian:GeoTrust_Primary_Certification_Authority_-_G2.pem
Adding debian:thawte_Primary_Root_CA_-_G2.pem
Adding debian:D-TRUST_Root_Class_3_CA_2_2009.pem
Adding debian:TURKTRUST_Certificate_Services_Provider_Root_2007.pem
Adding debian:TWCA_Root_Certification_Authority.pem
Adding debian:ACEDICOM_Root.pem
Adding debian:Entrust_Root_Certification_Authority.pem
Adding debian:Buypass_Class_3_Root_CA.pem
Adding debian:AffirmTrust_Commercial.pem
Adding debian:AddTrust_Low-Value_Services_Root.pem
Adding debian:Autoridad_de_Certificacion_Firmaprofesional_CIF_A62634068.pem
Adding debian:ePKI_Root_Certification_Authority.pem
Adding debian:Amazon_Root_CA_3.pem
Adding debian:VeriSign_Class_3_Public_Primary_Certification_Authority_-_G4.pem
Adding debian:TÜRKTRUST_Elektronik_Sertifika_Hizmet_Sağlayıcısı_H5.pem
Adding debian:Taiwan_GRCA.pem
Adding debian:SwissSign_Gold_CA_-_G2.pem
Adding debian:Staat_der_Nederlanden_EV_Root_CA.pem
Adding debian:Baltimore_CyberTrust_Root.pem
Adding debian:Certinomis_-_Root_CA.pem
Adding debian:Trustis_FPS_Root_CA.pem
Adding debian:Deutsche_Telekom_Root_CA_2.pem
Adding debian:SecureTrust_CA.pem
Adding debian:CNNIC_ROOT.pem
Adding debian:Secure_Global_CA.pem
Adding debian:SwissSign_Silver_CA_-_G2.pem
Adding debian:Global_Chambersign_Root_-_2008.pem
Adding debian:Staat_der_Nederlanden_Root_CA_-_G3.pem
Adding debian:Security_Communication_Root_CA.pem
Adding debian:DigiCert_Assured_ID_Root_G2.pem
Adding debian:Visa_eCommerce_Root.pem
Adding debian:GlobalSign_ECC_Root_CA_-_R5.pem
Adding debian:Swisscom_Root_CA_2.pem
Adding debian:SZAFIR_ROOT_CA2.pem
Adding debian:Starfield_Class_2_CA.pem
Adding debian:Certum_Root_CA.pem
Adding debian:Starfield_Root_Certificate_Authority_-_G2.pem
Adding debian:AC_RAIZ_FNMT-RCM.pem
Adding debian:DigiCert_High_Assurance_EV_Root_CA.pem
Adding debian:Hellenic_Academic_and_Research_Institutions_RootCA_2015.pem
Adding debian:VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.pem
Adding debian:Certplus_Root_CA_G2.pem
Adding debian:Security_Communication_RootCA2.pem
Adding debian:Microsec_e-Szigno_Root_CA_2009.pem
Adding debian:Camerfirma_Chambers_of_Commerce_Root.pem
Adding debian:AffirmTrust_Networking.pem
Adding debian:Hellenic_Academic_and_Research_Institutions_ECC_RootCA_2015.pem
Adding debian:GlobalSign_Root_CA_-_R2.pem
Adding debian:COMODO_ECC_Certification_Authority.pem
Adding debian:DST_Root_CA_X3.pem
Adding debian:Verisign_Class_3_Public_Primary_Certification_Authority_-_G3.pem
Adding debian:Certplus_Root_CA_G1.pem
Adding debian:Certinomis_-_Autorité_Racine.pem
Adding debian:thawte_Primary_Root_CA.pem
Adding debian:Atos_TrustedRoot_2011.pem
Adding debian:IdenTrust_Commercial_Root_CA_1.pem
Adding debian:USERTrust_RSA_Certification_Authority.pem
Adding debian:GlobalSign_Root_CA.pem
Adding debian:UTN_USERFirst_Hardware_Root_CA.pem
Adding debian:GeoTrust_Primary_Certification_Authority.pem
Adding debian:PSCProcert.pem
Adding debian:COMODO_Certification_Authority.pem
Adding debian:LuxTrust_Global_Root_2.pem
Adding debian:Entrust_Root_Certification_Authority_-_G2.pem
Adding debian:Amazon_Root_CA_1.pem
Adding debian:Staat_der_Nederlanden_Root_CA_-_G2.pem
Adding debian:ACCVRAIZ1.pem
Adding debian:NetLock_Arany_=Class_Gold=_Főtanúsítvány.pem
Adding debian:TÜBİTAK_UEKAE_Kök_Sertifika_Hizmet_Sağlayıcısı_-_Sürüm_3.pem
Adding debian:GlobalSign_ECC_Root_CA_-_R4.pem
Adding debian:E-Tugra_Certification_Authority.pem
done.
Setting up openjdk-9-jdk-headless:amd64 (9~b114-0ubuntu1) ...
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jlink to provide /usr/bin/jlink (jlink) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/idlj to provide /usr/bin/idlj (idlj) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jdeps to provide /usr/bin/jdeps (jdeps) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/wsimport to provide /usr/bin/wsimport (wsimport) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/rmic to provide /usr/bin/rmic (rmic) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jinfo to provide /usr/bin/jinfo (jinfo) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jsadebugd to provide /usr/bin/jsadebugd (jsadebugd) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jstat to provide /usr/bin/jstat (jstat) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/javac to provide /usr/bin/javac (javac) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/javah to provide /usr/bin/javah (javah) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jhsdb to provide /usr/bin/jhsdb (jhsdb) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jstack to provide /usr/bin/jstack (jstack) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jrunscript to provide /usr/bin/jrunscript (jrunscript) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/javadoc to provide /usr/bin/javadoc (javadoc) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jmod to provide /usr/bin/jmod (jmod) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/javap to provide /usr/bin/javap (javap) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jar to provide /usr/bin/jar (jar) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/policytool to provide /usr/bin/policytool (policytool) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/schemagen to provide /usr/bin/schemagen (schemagen) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jshell to provide /usr/bin/jshell (jshell) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jps to provide /usr/bin/jps (jps) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/xjc to provide /usr/bin/xjc (xjc) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jarsigner to provide /usr/bin/jarsigner (jarsigner) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jmap to provide /usr/bin/jmap (jmap) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jimage to provide /usr/bin/jimage (jimage) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jstatd to provide /usr/bin/jstatd (jstatd) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jdb to provide /usr/bin/jdb (jdb) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/serialver to provide /usr/bin/serialver (serialver) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/wsgen to provide /usr/bin/wsgen (wsgen) in auto mode
update-alternatives: using /usr/lib/jvm/java-9-openjdk-amd64/bin/jcmd to provide /usr/bin/jcmd (jcmd) in auto mode
Setting up openjdk-9-jre:amd64 (9~b114-0ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for ca-certificates (20170717~16.04.1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

done.
done.
Errors were encountered while processing:
 openjdk-9-source

相关内容