0

I am using Dreamhost VPS which doesn't provide sudo capability. Dreamhost runs on Ubuntu.

My final goal is to be able to use Ruby to run headless web browser. I picked Watir gem and it requires chromedriver.

I installed chromedriver into my home directory ~/chrome/, and added it to my $PATH.

I get an error

/home/user/.rvm/gems/ruby-2.3.0/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/remote/response.rb:69:in
`assert_ok': unknown error: Chrome failed to start: exited abnormally
(Selenium::WebDriver::Error::UnknownError)

It seems I need to install Xvfb and all guides suggest sudo apt-get install, which I can't do.

Even if I install Xvfb as standalone, it lacks a lot of extra stuff from X11:

[myServer]$ Xvfb :1 -screen 0 1024x768x24
(WW) Could not open RGB file "/usr/X11R6/lib/X11/rgb.txt"; will use built-in copy.
_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/ps554048:1
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/TTF/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list!

Fatal server error:
could not open default font 'fixed'

Temporary solution is to get instance on Amazon Web Services which allows 100% sudo and install all the necessary packages

0

If it is a Debian or Debian-based system and has apt installed, you can still use it - sorta.

Get a list of the URLs that apt-get install .... would download from - note that if there are packages already downloaded, it won't print the URL since the file exists under /var/cache/apt/archive.

user@darkstar:~$ apt-get upgrade --allow-unauthenticated -y --print-uris

URLs will be at the bottom of the output, you can parse them out with grep if needed. Anyway, gather all of the .deb files needed for this, and then on a machine where you do have root use alien to convert from deb format to .tgz (aka .tar.gz). Much like a Slackware package, it will contain a directory tree from the root / all the way down to wherever the file(s) actually live.

Once they are all converted, extract them all to some directory. Go to that directory, and create a new .tar.gz file containing the full ball of wax, scp to your webserver, extract, and then edit or set your $PATH and $LD_LIBRARY_PATH, etc. as needed.

  • it's ubuntu. Thanks! I couldn't find manual on going around apt-get myself – aaaaaa Dec 13 '18 at 1:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.