heroku部署,找不到libopus [英] heroku deployment, libopus not found

查看:117
本文介绍了heroku部署,找不到libopus的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在heroku中托管一个不和谐的音乐机器人,但是即使它在我的本地计算机上运行正常,它似乎也无法找到已部署的libopus库。

I am trying to host a discord music bot in heroku, but even if it works fine in my local machine, it doesnt seem to be able to find the libopus library deployed.

这是我的requirements.txt文件:

Here is my requirements.txt file:

aiohttp==1.0.5
async-timeout==2.0.1
beautifulsoup4==4.6.0
certifi==2018.1.18
cffi==1.11.5
chardet==3.0.4
cycler==0.10.0
discord.py[voice]==0.16.12
matplotlib==2.1.0
multidict==4.1.0
numpy==1.13.3
opuslib==3.0.1
pycparser==2.18
PyNaCl==1.0.1
pyparsing==2.2.0
python-dateutil==2.6.1
pytz==2017.3
scikit-learn==0.19.1
scipy==0.19.1
six==1.11.0
sklearn==0.0
websockets==3.4
youtube-dl==2018.4.9

我的Aptfile

libopus0
git
libopus-dev -y
libssl-dev
libffi-dev -y
libsodium-dev -y
:repo:ppa:mc3man/xerus-media -y
build-essential -y
unzip -y
software-properties-common -y

我的构建包

1. https://github.com/heroku/heroku-buildpack-apt.git
2. https://github.com/heroku/heroku-buildpack-apt
3. heroku/python
4. https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git
5. https://github.com/Crazycatz00/heroku-buildpack-libopus.git

错误日志

2018-04-12T21:48:26.872284+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/discord/client.py", line 307, in _run_event

2018-04-12T21:48:26.872287+00:00 app[worker.1]:     yield from getattr(self, event)(*args, **kwargs)

2018-04-12T21:48:26.872311+00:00 app[worker.1]:   File "main.py", line 113, in on_message

2018-04-12T21:48:26.872313+00:00 app[worker.1]:     music_service.voice_client = await client.join_voice_channel(voice_channel)

2018-04-12T21:48:26.872340+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/discord/client.py", line 3209, in join_voice_channel

2018-04-12T21:48:26.872343+00:00 app[worker.1]:     voice = VoiceClient(**kwargs)

2018-04-12T21:48:26.872369+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/discord/voice_client.py", line 230, in __init__

2018-04-12T21:48:26.872371+00:00 app[worker.1]:     self.encoder = opus.Encoder(48000, 2)

2018-04-12T21:48:26.872397+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/discord/opus.py", line 197, in __init__

2018-04-12T21:48:26.872400+00:00 app[worker.1]:     raise OpusNotLoaded()

2018-04-12T21:48:26.872450+00:00 app[worker.1]: discord.opus.OpusNotLoaded

我在很多地方搜索过已经添加了他们推荐的每个程序包,但似乎还不够。希望有人能提供帮助。

I have searched in a lot of places and have added every package they recommended but it seems its still not enough. Hope someone can help.

推荐答案

不幸的是,Heroku无法发送适当的语音数据包使您感到不和谐,因此您必须自行托管或使用vps使用音乐。有人确实发现了一个漏洞,但如果修补了它,则可能会发现idk,但很有可能您将无法获取音乐 https://i.stack.imgur.com/LWcF4.jpg

Unfortunately, Heroku can’t send the appropriate voice packets to discord, therefore you must self host or use a vps to use music. Somebody did find a loophole but idk if it was patched but chances are you won’t be able to get music https://i.stack.imgur.com/LWcF4.jpg

这篇关于heroku部署,找不到libopus的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆