参考文章:

https://blog.csdn.net/a60919820/article/details/101847890

安装mysql

参考:https://www.cnblogs.com/haima/p/15504670.html

再安装libmysqlclient-devmysql2

sudo cp /etc/apt/sources.list /etc/apt/sources.listbak #备份源
sudo vim /etc/apt/sources.list # 添加下面的源
deb [by-hash=force] https://mirrors.huaweicloud.com/deepin/ apricot main contrib non-free
sudo apt-get update #更新源
sudo apt-get upgrade 不用执行 安装mysql
参考下面的链接下载 mysql-apt-config_0.8.20-1_all.deb https://www.ywnz.com/linuxysjk/9249.html 选择安装mysql87或者mysql5.7的源
sudo dpkg -i ./mysql-apt-config_0.8.20-1_all.deb sudo apt-get update #更新源
sudo apt-get install mysql-server #安装mysql sudo service mysql status #查看MySQL是否安装成功 sudo apt-get install libmysqlclient-dev #安装mysql客户端依赖 cd 进入项目的根目录里
gem install mysql2 -v '0.4.10' --source 'https://gems.ruby-china.com/'
bundle install #安装项目的依赖
rails s #启动项目

ERROR: Error installing mysql2: ERROR: Failed to build gem native extension [@Ubuntu 15.04]的更多相关文章

  1. warning insecure world writable dir ruby mode 040777,gem insstal sass error failed to build gem native extension

    //1.删除原gem源 gem sources --remove https://rubygems.org/ //2.添加国内镜像 gem source -a https://gems.ruby-ch ...

  2. 安装sass时遇到Failed to build gem native extension

    错误信息 执行命令: sudo gem install sass时遇到下面的错误信息 Building native extensions. This could take a while... ER ...

  3. Ruby 踩坑 “Failed to build gem native extension”

    ruby新手,总是会出现这样那样的问题,这里先记录下,希望能解决你得问题. 首先是安装ruby 环境,楼主愚钝,在公司和自己的电脑上来来回回整了好几天,每次安装 gem 包的时候总是报错,错误信息大致 ...

  4. HADOOP 2.6 INSTALLING ON UBUNTU 14.04 (hadoop 2.6 部署到ubuntu 14.04上面)

    Hadoop on Ubuntu 14.04 In this chapter, we'll install a single-node Hadoop cluster backed by the Had ...

  5. Installing Nginx With PHP5 (And PHP-FPM) And MySQL Support (LEMP) On Ubuntu 12.04 LTS [repost]

    from : http://www.howtoforge.com/installing-nginx-with-php5-and-php-fpm-and-mysql-support-lemp-on-ub ...

  6. 解决 React-Native mac 运行报错 error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by ope

    React-Native 开发的项目,Android 方面没有任何问题,IOS 就是无法跑起来,报错信息如下: mac 10.14.4 xcode 10.2.1 error Failed to bui ...

  7. postman Installation has failed: There was an error while installing the application. Check the setup log for more information and contact the author

    Error msg: Installation has failed: There was an error while installing the application. Check the s ...

  8. 报error:getNetworkFromStore for nid failed while trying to build sandbox for cleanup: network

    docker服务起不来.报error:getNetworkFromStore for nid failed while trying to build sandbox for cleanup: net ...

  9. Entrypoint undefined = index.html html-webpack-plugin 错误ERROR in Error: Child compilation failed: Module build failed (from ./node_modules/html-webpack-plu SyntaxError: Unexpected token )

    Entrypoint undefined = index.html html-webpack-plugin 错误 ERROR in Error: Child compilation failed: M ...

  10. Mac 无法安装安装psutil 报错 error: command '/usr/bin/clang' failed with exit status 1

    psutil是一个特别好用来检查系统资源的一个包, 但是 在Mac安装却总是报错 查看监控系统脚本, 点这里 mac系统版本: Macos Mojave 10.14.3 报错信息如下: WARNING ...

随机推荐

  1. 初学STM32 CAN通信(三)

    1. stm32 CAN通信标准库函数 //CAN通信初始化函数 uint8_t CAN_Init(CAN_TypeDef* CANx, CAN_InitTypeDef* CAN_InitStruct ...

  2. PicGo图床配置github仓库上传typora图片

    (前提是已注册github并新建一个仓库作为你上传图片的位置) 首先在PicGo官网下载软件:https://picgo.github.io/PicGo-Doc/zh/ 打开typora,找到偏好设置 ...

  3. 使用sbt对Scala程序进行打包并运行(Spark单机运行)

    十.使用sbt对Scala程序进行打包并运行(Spark单机运行) 在./sparkapp 中新建文件 simple.sbt(vim ./sparkapp/simple.sbt),添加内容如下,声明该 ...

  4. reactive stream协议详解

    目录 背景 什么是reactive stream 深入了解java版本的reactive stream Publisher Subscriber Subscription Processor JDK中 ...

  5. Docker学习路线5:在 Docker 中实现数据持久化

    Docker 可以运行隔离的容器,包括应用程序和其依赖项,与主机操作系统分离.默认情况下,容器是临时的,这意味着容器中存储的任何数据在终止后都将丢失.为了解决这个问题并在容器生命周期内保留数据,Doc ...

  6. Vue3开源组件库

    最近收到的很多问题都是关于Vue3组件库的问题 今天就给大家推荐几个基于Vue3重构的开源组件库 目前状态都处于Beta阶段,建议大家抱着学习的心态入场,勿急于用到生产环境 Ant-design-vu ...

  7. etcd 集群安装

    1.环境准备 下载安装包:https://github.com/etcd-io/etcd/releases/ 这里下载的安装包为:etcd-v3.5.9-linux-amd64.tar.gz,即我们当 ...

  8. 力扣262(MySQL)-行程和用户(困难)

    题目: 表:Trips 表:Users 取消率 的计算方式如下:(被司机或乘客取消的非禁止用户生成的订单数量) / (非禁止用户生成的订单总数). 写一段 SQL 语句查出 "2013-10 ...

  9. [ABC342D] Square Pair 题解

    [题目描述] 给定一个长度为 \(N\) 的非负整数序列 \(A=\left(A_1,\cdots,A_n\right)\).求满足以下条件的整数对 \(\left(i,j\right)\) 的数量. ...

  10. iLogtail社区版使用入门 - 采集MySQL Binlog

    简介: MySQL Binlog记录了MySQL的变更日志,业界也有一些方案来同步Binlog的数据,如Canal.MaxWell.DTS等.不同的工具可以实现不同的目标,iLogtail也提供了便捷 ...