安装脚本
#!/bin/bash
# 安装编译开发环境
sudo apt update
sudo apt install build-essential
sudo apt install sqlite3 sqlite libevent-dev
# yum groupinstall "Development Tools"
# 安装pkg-config
wget https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz
tar -xzvf pkg-config-0.29.2.tar.gz
cd pkg-config-0.29.2
./configure --with-internal-glib
make install
# 安装libevent
wget https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz
tar -xzvf libevent-2.1.12-stable.tar.gz
cd libevent-2.1.12-stable
./configure
make install
# 解压缩coturn
tar -xzvf turnserver-*.tar.gz
cd turnserver
./configure
make install''注意:上述脚本未投入实际生产环境中使用,中间存在许多问题,需选择执行里面的语句。''问题
执行./configure安装时出现以下报错(wsl2 Ubuntu 20.04.2 LTS)
ginstall: not found
install is /usr/bin/install
pkill is /usr/bin/pkill
sqlite3: not found
sqlite: not found
Use TMP dir /var/tmp
Compiler: cc
pkgconf: not found
pkg-config: not found
ERROR: pkg-config not foundginstall not found:ginstall是linux早期的版本,现在已经使用install。上述报not found的问题,可以忽略。sqlite3 not found:需要安装sqlite3-dev,可以通过--with-<library>=/<path/to/installed/library>进行安装。[https://unix.stackexchange.com/questions/43952/installing-from-source-how-to-resolve-dependencies-without-destroying-the-packa Installing from source. How to resolve dependencies without destroying the package manager]
sqlite not found:需要安装sqlite-dev,可以通过--with-<library>=/<path/to/installed/library>进行安装。
pkgconf: not found,pkg-config: not found:pkgconfig和pkg-config是相同的软件(只是版本不同)。必须需要先安装pkg-config,否则无法继续执行配置操作。
DISCUSSION
评论
还没有公开评论,欢迎留下想法。