Shadowsocks-libev: dpkg-checkbuilddeps: Unmet build dependencies: libmbedtls-dev libsodium-dev (>= 1.0.8~)

Created on 9 Feb 2017  ·  13Comments  ·  Source: shadowsocks/shadowsocks-libev

What version of shadowsocks-libev are you using?

shadowsocks-libev 3.0.1 b09c2be

What operating system are you using?

Debian 8

What did you do?

build and install directly from source

What did you expect to see?

build and install successfully

What did you see instead?

执行 ./autogen.sh && dpkg-buildpackage -b -us -uc -i 后报错
dpkg-checkbuilddeps: Unmet build dependencies: libmbedtls-dev libsodium-dev (>= 1.0.8~)
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)

What is your config in detail (with all sensitive info masked)?

PS. 我按照说明编译了LIBSODIUM 1.0.11和MBEDTLS 2.4.0

从昨天开始出现的,之前的版本编译都是成功的。

Most helpful comment

@lingbaoboy

git clone https://github.com/shadowsocks/shadowsocks-libev.git
cd shadowsocks-libev
git submodule update --init --recursive
sudo sh -c 'printf "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list'
sudo apt-get update
sudo apt-get -t jessie-backports install libmbedtls-dev libsodium-dev
sudo apt-get install --no-install-recommends gettext build-essential autoconf libtool libpcre3-dev asciidoc xmlto libev-dev libudns-dev automake
./autogen.sh && ./configure && make
sudo make install

##Be careful of the output, you will see the installation directory, in my case is /usr/local/bin, NOT the older /usr/bin##

All 13 comments

./configure and make shouldn't invoke any dpkg-* command, including dpkg-buildpackage. Please check your command history again.

刚才打错了,是执行 ./autogen.sh && dpkg-buildpackage -b -us -uc -i 后报错

You will not be able to build .deb anymore on vanilla Debian 8. As written in README.md, you have to install libsodium-dev from jessie-backports, which is v1.0.11 now. libsodium-dev from main repo in Debian does not meet the requirement of this project.

If you don't want to enable jessie-backports, you won't be able to make shadowsocks-libev 3.x .deb package on Debian 8. The only option is to build and install using bare make && make install.

So that's why we need it working on ubuntu 14.04 or older Debian version

@debiansid It's still working, but with additional steps.

@cokebar

dpkg-buildpackage -b -us -uc -i
dpkg-buildpackage: source package shadowsocks-libev
dpkg-buildpackage: source version 3.0.1-1
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by Max Lv <[email protected]>
dpkg-buildpackage: host architecture amd64
 dpkg-source -i --before-build shadowsocks-libev
dpkg-checkbuilddeps: Unmet build dependencies: libmbedtls-dev
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)

it was good before.

why we need this is we need build deb for vps,and saving space from installing build environments.
thanks

First, if you want to use .deb, then there shouldn't be any manual installation like make install around. Every dependency needs to appear as .deb package. The "it was good before" was an apparent bug and might cause your system to enter inconsistent state, which should be prevented.

You will need to find someone who is willing to provide libsodium-dev and libmbedtls-dev deb package for Ubuntu 14.04, perhaps through some third-party ppa or do it by yourself. Note that even with proper dependency package, there is no guarantee that you can build on Ubuntu 14.04 successfully, but you can always take a try.

Otherwise you can only install from source with no deb package.

在Ubuntu 16.04 x86_64 同样遇到这个问题,到底怎么编译啊?!

@lingbaoboy

git clone https://github.com/shadowsocks/shadowsocks-libev.git
cd shadowsocks-libev
git submodule update --init --recursive
sudo sh -c 'printf "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list'
sudo apt-get update
sudo apt-get -t jessie-backports install libmbedtls-dev libsodium-dev
sudo apt-get install --no-install-recommends gettext build-essential autoconf libtool libpcre3-dev asciidoc xmlto libev-dev libudns-dev automake
./autogen.sh && ./configure && make
sudo make install

##Be careful of the output, you will see the installation directory, in my case is /usr/local/bin, NOT the older /usr/bin##

@JoshDaone
谢谢。昨天已经重装系统并编译安装了ss ,通过编译安装缺点是没有开机启动,我的做法是把 /usr/local/bin里边ss-*全部复制到 /usr/bin里边,然后在源代码文件夹找的配置文件分别放到对应文件夹,最后通过systemctl enable shadowsocks.service来设置开机启动。
现在遇到问题是3.0.1版无法使用kcptun加速,不知道你有没有遇到?

Change Controls in debian folder,remove libmbedtls-dev then you can build deb

@lingbaoboy 配合kcptun推荐使用go版本。开机启动我用的脚本,在.bashrc里边source xxx.sh

Was this page helpful?
0 / 5 - 0 ratings

Related issues

d0u9 picture d0u9  ·  4Comments

mcmxciv picture mcmxciv  ·  3Comments

qianguozheng picture qianguozheng  ·  4Comments

alfal picture alfal  ·  3Comments

iceberg1369 picture iceberg1369  ·  3Comments