2017-06-13 36 views
5

Tôi đang cố gắng tải ảnh chụp màn hình qua dòng lệnh bằng các tính năng mới của Google Chrome 59 (Google Chrome 59.0 .3071.86) trong hộp Centos 7 và tôi gặp lỗi khi nói rằng nó không thể tải xuống thư mục tải xuống. Tôi đã cố tạo thư mục trong thư mục chính nhưng không thành công! Bất kỳ đề xuất?google-chrome --headless --screenshot đang gặp lỗi với thông báo "Không thể tải xuống thư mục" trên Centos 7

[[email protected]_1 ~]# google-chrome-stable --headless --disable-gpu --enable-logging -v=5 --screenshot=out.png http://www.google.com 
    [0613/154943.103775:VERBOSE1:zygote_main_linux.cc(626)] ZygoteMain: initializing 0 fork delegates 
    [0613/154943.104006:INFO:cpu_info.cc(50)] Available number of cores: 1 
    [0613/154943.108816:VERBOSE1:audio_manager_pulse.cc(273)] Failed to connect to the context. Error: Connection refused 
    [0613/154943.108868:WARNING:audio_manager.cc(293)] Multiple instances of AudioManager detected 
    [0613/154943.108875:WARNING:audio_manager.cc(254)] Multiple instances of AudioManager detected 
    [0613/154943.109345:VERBOSE1:webrtc_internals.cc(106)] Could not get the download directory. 
    Trace/breakpoint trap 
    [[email protected]_1 ~]# google-chrome-stable --version 
    [[email protected]_1 ~]# Google Chrome 59.0.3071.86 

Dưới đây là cấu trúc thư mục của tôi:

[[email protected]_1 ~]# ls -la 
    total 56 
    dr-xr-x---. 12 root root 4096 Jun 13 15:23 . 
    dr-xr-xr-x. 17 root root 4096 Jun 13 13:42 .. 
    -rw-------. 1 root root 1116 Dec 24 2015 anaconda-ks.cfg 
    drwx------. 3 root root 16 Jan 22 10:10 .ansible 
    -rw-------. 1 root root 18800 Jun 13 14:59 .bash_history 
    -rw-r--r--. 1 root root 18 Dec 28 2013 .bash_logout 
    -rw-r--r--. 1 root root 176 Dec 28 2013 .bash_profile 
    -rw-r--r--. 1 root root 176 Dec 28 2013 .bashrc 
    drwx------. 3 root root 16 Oct 24 2016 .cache 
    drwx------. 3 root root 26 Jun 13 2017 .config 
    -rw-r--r--. 1 root root 100 Dec 28 2013 .cshrc 
    drwxr-xr-x. 2 root root  6 Jun 13 2017 download 
    drwxr-xr-x. 2 root root  6 Jun 13 2017 Download 
    drwxr-xr-x. 2 root root  6 Jun 13 2017 downloads 
    drwxr-xr-x. 2 root root  6 Jun 13 2017 Downloads 
    drwxr-xr-x. 3 root root 18 Jun 13 2017 .local 
    drwxr-----. 3 root root 18 Dec 24 2015 .pki 
    drwx------. 2 root root 28 Jan 22 10:09 .ssh 
    -rw-r--r--. 1 root root 129 Dec 28 2013 .tcshrc 
    -rw-r--r-- 1 root root 228 Jun 13 15:23 test.py 
    [[email protected]_1 ~]# 

Trả lời

2

Tôi tìm thấy một câu trả lời cho điều này ở đây: https://bugs.chromium.org/p/chromium/issues/detail?id=695212

Cách khắc phục là cài đặt các font gói google:

$ sudo yum install gnu-free-sans-fonts 

Sau đó, thao tác này sẽ hoạt động:

$ google-chrome --headless --disable-gpu --enable-logging -v=10 --screenshot=out.png http://www.chromestatus.com 
Các vấn đề liên quan