过去两天一直在尝试设置 plex 服务器。我最初已将其启动并运行,但我重新启动了,现在无法重新启动它。
背景:
- 运行 16.04 32位
- 安装并设置服务器,一切正常
- 重启机器
- 自重启以来,无法让服务器运行
- 运行
sudo dpkg -r plexmediaserver
并sudo dpkg -P plexmediaserver
重新安装,但这对错误没有任何影响
- 运行
- 还运行 sonarr 和 nzbget(我怀疑这对问题是否有任何影响,但你永远不知道)
运行sudo systemctl status plexmediaserver
并输出如下:
plexmediaserver.service - Plex Media Server for Linux
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
Active: inactive (dead) (Result: exit-code) since Mon 2017-11-20 21:47:11 EST; 44s ago
Process: 5144 ExecStart=/bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver "/usr/lib/plexmediaserver/Plex Media Server" (
Process: 5140 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${
Main PID: 5144 (code=exited, status=127)
Nov 20 21:47:05 media-server systemd[1]: plexmediaserver.service: Unit entered failed state.
Nov 20 21:47:05 media-server systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Nov 20 21:47:11 media-server systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Nov 20 21:47:11 media-server systemd[1]: Stopped Plex Media Server for Linux.
Nov 20 21:47:11 media-server systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Nov 20 21:47:11 media-server systemd[1]: Failed to start Plex Media Server for Linux.
Nov 20 21:47:44 media-server systemd[1]: Stopped Plex Media Server for Linux.
结果journalctl -xe
-- Subject: Unit plexmediaserver.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit plexmediaserver.service has finished starting up.
--
-- The start-up result is done.
Nov 20 21:47:00 media-server sh[5132]: /bin/sh: 1: /usr/lib/plexmediaserver/Plex Media Server: not found
Nov 20 21:47:00 media-server systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=127/n/a
Nov 20 21:47:00 media-server systemd[1]: plexmediaserver.service: Unit entered failed state.
Nov 20 21:47:00 media-server systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Nov 20 21:47:04 media-server sudo[5137]: david : TTY=pts/7 ; PWD=/home/david/Downloads ; USER=root ; COMMAND=/bin/systemctl status plexmediaserver
Nov 20 21:47:04 media-server sudo[5137]: pam_unix(sudo:session): session opened for user root by (uid=0)
Nov 20 21:47:05 media-server systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Nov 20 21:47:05 media-server systemd[1]: Stopped Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit plexmediaserver.service has finished shutting down.
Nov 20 21:47:05 media-server systemd[1]: Starting Plex Media Server for Linux...
-- Subject: Unit plexmediaserver.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit plexmediaserver.service has begun starting up.
Nov 20 21:47:05 media-server systemd[1]: Started Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit plexmediaserver.service has finished starting up.
--
-- The start-up result is done.
Nov 20 21:47:05 media-server sh[5144]: /bin/sh: 1: /usr/lib/plexmediaserver/Plex Media Server: not found
Nov 20 21:47:05 media-server systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=127/n/a
Nov 20 21:47:05 media-server systemd[1]: plexmediaserver.service: Unit entered failed state.
Nov 20 21:47:05 media-server systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Nov 20 21:47:10 media-server sudo[5137]: pam_unix(sudo:session): session closed for user root
Nov 20 21:47:11 media-server systemd[1]: plexmediaserver.service: Service hold-off time over, scheduling restart.
Nov 20 21:47:11 media-server systemd[1]: Stopped Plex Media Server for Linux.
-- Subject: Unit plexmediaserver.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit plexmediaserver.service has finished shutting down.
答案1
从 Michael Bay 提供的链接可以分为两个步骤来解决这个问题:
打开终端并运行:
sudo locale-gen en_us.utf-8 #this is a comment:(or your appropriate locale)
使用
nano
文本编辑器打开lexmediaserver.service
找到的文件/etc/systemd/system/
并确保已设置语言环境:Environment=LC_ALL=en_US.UTF-8
来源:
https://forums.plex.tv/discussion/282507/failed-to-start-plex-media-server 环境=LANG=en_US.UTF-8
答案2
我第一次手动安装 plex 服务器时也遇到了同样的问题,对我来说也没有用。浏览论坛时,每个人都建议正确设置系统区域设置和语言,我在安装 ubuntu 服务器时也这样做了。
我没有“正确答案”,因为我不知道是什么原因造成的,以及如何解决它,但我可以告诉你我用来让它工作的解决方法,它也可能对你有帮助
我使用过第三方工具包,从未遇到过问题,在我看来,它对我这样的新手来说很好用。您也可以尝试一下,请按照:
https://github.com/htpcBeginner/AtoMiC-ToolKit
编辑:尝试一下 atomic toolkit,但通过查看 journalctl -xe 结果,你可能没有该路径的 rw 访问权限,请执行
ls -l
在 /usr/lib/plexmediaserver 目录中,您可能没有设置正确的所有权,请尝试使用以下命令更改所有权
sudo chown -R "user:group" <folder_name>
或者在您的设置中,路径有一个额外的空格,相信我,这种情况会发生