本文将带您了解关于如何修复ubuntuWSL中的mysql-server安装错误的新内容,另外,我们还将为您提供关于1.wsl-ubuntu-22.04安装gcc13、Canonical发布Ubunt
本文将带您了解关于如何修复 ubuntu WSL 中的 mysql-server 安装错误的新内容,另外,我们还将为您提供关于1. wsl-ubuntu-22.04 安装 gcc 13、Canonical 发布 Ubuntu-WSL,提供更好的 Ubuntu 集成、Django 配置 mysql 数据库报错 error: Microsoft Visual C++ 14.0 is required. pip 安装错误、install nginx on ubuntu install ubuntu usb install ubuntu 14.04 ubuntu install jd的实用信息。
本文目录一览:- 如何修复 ubuntu WSL 中的 mysql-server 安装错误
- 1. wsl-ubuntu-22.04 安装 gcc 13
- Canonical 发布 Ubuntu-WSL,提供更好的 Ubuntu 集成
- Django 配置 mysql 数据库报错 error: Microsoft Visual C++ 14.0 is required. pip 安装错误
- install nginx on ubuntu install ubuntu usb install ubuntu 14.04 ubuntu install jd
如何修复 ubuntu WSL 中的 mysql-server 安装错误
如何解决如何修复 ubuntu WSL 中的 mysql-server 安装错误
我已将 ubuntu 18.04 安装为 WSL 并启动 LAMPP 配置,我成功安装了 apache ap PHP 及其所有软件包,但 MysqL-server 未完成安装,它崩溃并出现此错误:
> sudo apt install MysqL-server [sudo] password for mamuya7: Reading
> package lists... Done Building dependency tree Reading state
> information... Done MysqL-server is already the newest version
> (5.7.33-0ubuntu0.18.04.1). 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. Do you want to
> continue? [Y/n] y Setting up MysqL-server-5.7
> (5.7.33-0ubuntu0.18.04.1) ... invoke-rc.d: Could not determine current
> runlevel * Stopping MysqL database server MysqLd
> [ OK ] 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/14239/fd/7: Operation
> not permitted Cannot stat file /proc/14239/fd/10: Operation not
> permitted Cannot stat file /proc/14239/fd/5: Operation not permitted
> Cannot stat file /proc/25030/fd/10: Operation not permitted Cannot
> stat file /proc/25031/fd/10: Operation not permitted Cannot stat file
> /proc/25032/fd/10: Operation not permitted Cannot stat file
> /proc/25033/fd/10: Operation not permitted Cannot stat file
> /proc/25034/fd/10: Operation not permitted Checking if update is
> needed. This installation of MysqL is already upgraded to 5.7.33,use
> --force if you still need to run MysqL_upgrade 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/14239/fd/7: Operation not permitted
> Cannot stat file /proc/14239/fd/10: Operation not permitted Cannot
> stat file /proc/14239/fd/5: Operation not permitted Cannot stat file
> /proc/25030/fd/10: Operation not permitted Cannot stat file
> /proc/25031/fd/10: Operation not permitted Cannot stat file
> /proc/25032/fd/10: Operation not permitted Cannot stat file
> /proc/25033/fd/10: Operation not permitted Cannot stat file
> /proc/25034/fd/10: 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.
>
> dpkg: error processing package MysqL-server (--configure): dependency
> problems - leaving unconfigured No apport report written because the
> error message indicates its a followup error from a prevIoUs failure.
> Errors were encountered while processing: MysqL-server-5.7
> MysqL-server E: Sub-process /usr/bin/dpkg returned an error code (1)
我已经搜索并尝试了多种解决方案,但它们都不起作用。 我尝试过的一些链接是:
error: ''Can''t connect to local MySQL server through socket ''/var/run/mysqld/mysqld.sock'' (2)'' -- Missing /var/run/mysqld/mysqld.sock windows subsystem install mysql server https://askubuntu.com/questions/1098920/unable-to-install-mysql-server-sub-process-usr-bin-dpkg-returned-an-error-code https://github.com/Microsoft/WSL/issues/1761#issuecomment-393652849 https://www.digitalocean.com/community/questions/mysql-installation-error-dpkg-error-processing-package-mysql-server-5-5-configure
1. wsl-ubuntu-22.04 安装 gcc 13
0. Ubuntu 软件仓库镜像源
- /etc/apt/sources.list
- 使用清华源
sudo apt update
1. 安装 build-essential
sudo apt install build-essential
安装完检查 /usr/bin/ 下是否有 gcc, g++, gcc-11, g++11.
2. 添加 ppa 源
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
3. 安装 gcc-13 和 g++-13
sudo apt install gcc-13
sudo apt install g++-13
4. 设定优先级
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13
5. 检查 gcc 和 g++ 的版本
gcc -v
g++ -v
6. 支持的标准
GCC supports the original ISO C++ standard published in 1998, and the 2011, 2014, 2017 and mostly 2020 revisions.
···
Canonical 发布 Ubuntu-WSL,提供更好的 Ubuntu 集成
Canonical 的 Balint Reczey 发布了一个新的 Ubuntu-WSL 包,它将在微软的 Windows Subsystem for Linux(WSL)上运行 Ubuntu 时默认安装,以提供更好的集成。
Ubuntu-WSL 是一个新的软件包,用于集成要安装在每个 Ubuntu WSL 系统上的包。通过对 ubuntu-wsl 包的更新,Canonical 将为 Ubuntu WSL 安装添加新功能,使它们更容易使用。
Ubuntu 已经是微软商店中用于在 WSL/WSL 2 上运行的旗舰 Linux 发行版, 所以使用 Ubuntu-WSL 包将会提高用户的体验。
目前,Ubuntu-WSL 引入了 wslu,wslu 是一个用于 WSL 的实用程序集,这些实用程序可以很容易在 Windows 10 桌面创建 Linux 程序的快捷方式、屏幕截图工具、访问 Windows 环境变量的工具、将 Windows 默认网络浏览器绑定为 WSL 网络浏览器的包装工具以及其他集成增强功能。
wslu 是独立于 Canonical/Ubuntu 开发的,并在 WSL 上与众多 Linux 发行版一起工作,而现在 Canonical 将在默认情况下为 WSL 上的 Ubuntu 提供它。据说,这个新的 Ubuntu-WSL 包未来将可以实现更多 WSL 特性。
Django 配置 mysql 数据库报错 error: Microsoft Visual C++ 14.0 is required. pip 安装错误
使用 pip install mysql-python 安装 mysql 包时出现错误
error: Microsoft Visual C++ 14.0 is required. pip 安装错误
解决方法:
通过提示我们可以得知是由于 c++ 依赖库不存在,所以在对包进行编译的时候出错,故我们可以去直接下载二进制安装包进行安装。
下载地址:https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python
1. 找到你所需要的包下载,注意你的 python 版本和电脑 32 位或 64 位
2. 在该文件夹按下 shift + 右键,选择‘在此处打开命令窗口‘(或者在 cmd 中 cd 进入包所安装的目录)
3. 在 cmd 窗口中输入:pip install 包的名字.whl
4. 比如安装 matplotlib 出现下面界面即为安装成功
附:settings.py database 中设置数据库连接配置
DATABASES = {
''default'': {
''ENGINE'': ''django.db.backends.mysql'',
''NAME'': ''my_web'',
''USER'': ''root'',
''PASSWORD'': ''password'',
''HOST'': ''127.0.0.1'',
''PORT'': ''3306'',
}
}
install nginx on ubuntu install ubuntu usb install ubuntu 14.04 ubuntu install jd
我们今天的关于如何修复 ubuntu WSL 中的 mysql-server 安装错误的分享就到这里,谢谢您的阅读,如果想了解更多关于1. wsl-ubuntu-22.04 安装 gcc 13、Canonical 发布 Ubuntu-WSL,提供更好的 Ubuntu 集成、Django 配置 mysql 数据库报错 error: Microsoft Visual C++ 14.0 is required. pip 安装错误、install nginx on ubuntu install ubuntu usb install ubuntu 14.04 ubuntu install jd的相关信息,可以在本站进行搜索。
本文标签: