Linux Xvfb 启动失败错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16726227/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 23:01:01  来源:igfitidea点击:

Xvfb failed start error

linuxubuntu

提问by user1413449

I have Ubuntu 11.04 I am trying to install Xvfb and CutyCapt in order to take a snapshot of webpage I followed a instruction https://github.com/jaequery/cutycapt-installer-script-on-ubuntu/blob/master/installand I executed last line and it gives me an error

我有 Ubuntu 11.04 我正在尝试安装 Xvfb 和 CutyCapt 以便拍摄网页快照我按照说明 https://github.com/jaequery/cutycapt-installer-script-on-ubuntu/blob/master/install和我执行了最后一行,它给了我一个错误

xvfb-run: error:Xvfb failed to start

xvfb-run: 错误:Xvfb 无法启动

Any solution for that? Thank you in advance

有什么解决办法吗?先感谢您

回答by absynce

Run xvfb-run -e /dev/stdout [mycommand]as @wumpus suggested.

xvfb-run -e /dev/stdout [mycommand]按照@wumpus 的建议运行。

I received the server lock message:

我收到服务器锁定消息:

Fatal server error:
Could not create server lock file: /tmp/.X99-lock

xvfb-run: 

error: Xvfb failed to start

Using sudoresolved the issue for me:

使用sudo为我解决了这个问题:

sudo xvfb-run -e /dev/stdout [mycommand]

回答by Tom

I was getting this error "xvfb-run: error: Xvfb failed to start" on Ubuntu 14.04, where previously my script had run without problems on Ubuntu 12.04.

我在 Ubuntu 14.04 上收到此错误“xvfb-run: error: Xvfb failed to start”,之前我的脚本在 Ubuntu 12.04 上运行没有问题。

My scripts were running calling xvfb-run multiple times, but I was seeing fails due to the error "Server is already active for display 99"

我的脚本运行多次调用 xvfb-run,但我看到由于错误“服务器已处于活动状态以显示 99”而失败

It seemed that the Xvfb wasn't ending when the xvfb-run command returned.

当 xvfb-run 命令返回时,似乎 Xvfb 并没有结束。

My solution was to use "xvfb-run -a [mycommand]"so xvfb uses another display if 99 is in use.

我的解决方案是使用"xvfb-run -a [mycommand]"xvfb 如果正在使用 99 则使用另一个显示器。

回答by Ronak Patel

Found the problem There is hanging process in system with name

发现问题 系统中存在挂起进程,名称为

Xvfb

I killed it and work fine. I newer found it earlier beacuse I used to try to find process with 'xvfb' name

我杀了它并且工作正常。我较新发现它更早,因为我曾经尝试使用“xvfb”名称查找进程

回答by kakhkAtion

Had the same issue, solved it by running this instead:

有同样的问题,通过运行这个来解决它:

xvfb-run --auto-servernum --server-num=1 [your script]

--auto-servernum: Try to get a free server number, starting at 99, or the argument to --server-num

--auto-servernum: 尝试获取一个免费的服务器号,从 99 开始,或者--server-num的参数