Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问一下在编译的时候提示需要udns怎么办? #1640

Closed
onlyJinx opened this issue Aug 20, 2017 · 13 comments
Closed

请问一下在编译的时候提示需要udns怎么办? #1640

onlyJinx opened this issue Aug 20, 2017 · 13 comments
Labels

Comments

@onlyJinx
Copy link

Please answer these questions before submitting your issue. Thanks!

(Please mention that if the issue you filed is solved, you may wish to close it by yourself. Thanks again.)

(PS, you can remove 3 lines above, including this one, before post your issue.)

What version of shadowsocks-libev are you using?

版本是3.08

What operating system are you using?

CentOS7

What did you do?

翻墙

What did you expect to see?

What did you see instead?

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

VPS是搬瓦工的,无法通过yum来安装,我用腾讯云那个但是可以直接通过yum install udns-devel来安装,现在我去Google找不到答案,想通过rpm来装但是那个网站提供的会无限嵌套依赖包……现在想来问一下大家怎么办!!

Google translate:
VPS is bandwagonhostVPS , can not be installed through yum, I use Tencent cloud that can be directly through the yum install udns-devel to install, and now I go to Google can not find the answer, would like to run through the rpm but the site will provide unlimited Nested dependency package ... now want to ask you how to do! The

@ghost
Copy link

ghost commented Aug 20, 2017

哦,centos7啊,centos本身是比Fedora少一些软件的,但是这部分软件可以通过启用epel来弥补,你说的腾讯云可能是默认启用了epel所以可以装。
启用epel然后安装udns-devel的方法:

yum install epel-release
yum update
yum install udns-devel

还有一种可能就是epel已经安装但是被禁用了,
那就先启用他就行

yum-config-manager --enable epel
yum update
yum install udns-devel

@onlyJinx
Copy link
Author

@nymphaqua9 一路Google过来终于编译好了,一个错误信息我就Google一次然后就去下载依赖文件编译,现在编译好了之后启动不了,配置文件已经放好位置了,启动时提示

Starting shadowsocks-libev (via systemctl): Job for shadowsocks-libev.service failed because the control process exited with error code. See "systemctl status shadowsocks-libev.service" and "journalctl -xe" for details.
[FAILED]

然后按照提示输入命令行后提示这个:

root@host ~]# systemctl status shadowsocks-libev.service
● shadowsocks-libev.service - SYSV: lightweight secured socks5 proxy
Loaded: loaded (/etc/rc.d/init.d/shadowsocks-libev; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2017-08-20 04:58:18 EDT; 3min 17s ago
Docs: man:systemd-sysv-generator(8)
Process: 10849 ExecStart=/etc/rc.d/init.d/shadowsocks-libev start (code=exited, status=1/FAILURE)

Aug 20 04:58:18 host.localdomain systemd[1]: Starting SYSV: lightweight s....Aug 20 04:58:18 host.localdomain shadowsocks-libev[10849]: Starting shadow...Aug 20 04:58:18 host.localdomain shadowsocks-libev[10849]: [FAILED]
Aug 20 04:58:18 host.localdomain systemd[1]: shadowsocks-libev.service: c...1Aug 20 04:58:18 host.localdomain systemd[1]: Failed to start SYSV: lightw....Aug 20 04:58:18 host.localdomain systemd[1]: Unit shadowsocks-libev.servi....Aug 20 04:58:18 host.localdomain systemd[1]: shadowsocks-libev.service fa....Hint: Some lines were ellipsized, use -l to show in full.

麻烦你帮我看一下是哪里出错了,非常感谢

@ghost
Copy link

ghost commented Aug 20, 2017

那你直接用ss-server行吗,我也没用过ss自带的service,没看出问题在哪儿,我都是自己写的service文件,我现只有手机,也没法给你个例子。

@onlyJinx
Copy link
Author

@nymphaqua9 我看了几篇教程但结果都无法启动,这是其中一篇你看看过程错了没http://www.leyar.me/Compile-shadowsocks-libev-in-CentOS7/
还有怎么知道我编译安装成功没?我想看看是不是没安装成功(编译过程没报错)

@bigtan
Copy link

bigtan commented Aug 20, 2017

https://www.dropbox.com/s/u4n8c781z0m5iut/ss-server?dl=0
https://www.dropbox.com/s/7vbg2kxcul9se0u/obfs-server?dl=0

上面两个链接都是静态编译的,没有依赖,楼主要不要试试?

@ghost
Copy link

ghost commented Aug 20, 2017

我没单独编译依赖,都是装的-devel
你能运行ss-server吗,能运行应该就没错
如果能运行,你就可以试试自己写个service,我的是这样的

就把你直接运行ss-server能成功的那套放到ExecStart后面就行了,注意要完整路径,可以用find / -name ss-server 找一下,因为用了Type=simple,所以参数里不要有-f .pid啥的。

nano /usr/lib/systemd/system/shadowsocks.service

[Unit]
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/ss-server

[Install]
WantedBy=multi-user.target

systemctl enable shadowsocks.service

@applea9
Copy link

applea9 commented Aug 21, 2017

I would like to suggest to compile udns and install it.

@bigtan
Copy link

bigtan commented Aug 21, 2017

[Unit]
Description=Shadowsocks Server
After=network.target

[Service]
ExecStart=/usr/local/bin/ss-server -s 0.0.0.0 -p 4000 -k password -m chacha20-ietf-poly1305 -u
User=nobody
Group=nogroup

[Install]
WantedBy=multi-user.target

@ghost
Copy link

ghost commented Aug 21, 2017

Maybe you should to try this:

First into the shadowsocks-libev directory

sudo mkdir -p /etc/shadowsocks-libev
sudo cp ./rpm/SOURCES/etc/init.d/shadowsocks-libev /etc/init.d/shadowsocks-libev
sudo cp ./debian/config.json /etc/shadowsocks-libev/config.json
sudo chmod +x /etc/init.d/shadowsocks-libev

Edit the configuration file

sudo vim /etc/shadowsocks-libev/config.json

Start the service

sudo systemctl start shadowsocks-libev

@onlyJinx
Copy link
Author

@nymphaqua9 我用find 找到了两个路径
[root@VM_1_202_centos ~]# find / -name ss-server
/usr/bin/ss-server
/root/shadowsocks-libev/completions/bash/ss-server

现在我可以通过
ss-server -u -c /etc/shadowsocks-libev/config.json
来启动并正常使用了,但你说的那个添加services的方法我启动不成功,启动方式和路径上面已经写出来了,你能帮我看看那个ExecStart怎么改吗?麻烦你了…

@onlyJinx
Copy link
Author

@bigtan @Chewy9
非常感谢,现在已经成功启动了
Google translate:
Thank you very much that it has been successfully started

@onlyJinx
Copy link
Author

@nymphaqua9 非常谢谢你的耐心解答

@racecoder
Copy link

真的是epel被禁用了,非常感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants