Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command Line Install of Mozilla Firefox for Selenium Scraping

Hi I have a scraper running locally however when trying to launch it using a Vagrant machine onto AWS EC2 linux environment I have come across the following problem.

When I tested it by running on Linux I was able to download linux directly along with Firebug and then run my Selenium webdriver. In this case I am writing a file with the necessary installations. I am having trouble however due to the lack of being able to install firefox directly from the command line (along with firebug).

This is what my worker's error looks like (it runs fine on my local machine with firefox installed and on linux with it installed):

[worker]     " Please specify the firefox binary location or install firefox")
[worker] RuntimeError: Could not find firefox in your system PATH. Please specify the firefox binary location or install firefox

I am currently running something like this to create the correct dev environment. I thought I could use Mozmill to recreate firefox. Has anyone encountered / solved this?

  • sudo easy_install pip
  • sudo pip install selenium
  • sudo pip install mozmill

I need a command line install of Firefox and Firebug. Thank you!

PROGRESS:

I am using sudo apt-get install firefox right now which I believe may work. I can't test it actually running without also getting firebug and net export to work as well. I tried sudo apt-get install firebug but it cannot be found. It was said to work here: http://www.daveshuck.com/2008/05/06/firebug-with-firefox-3-in-ubuntu-hardy-heron/ However it does not work for me?

like image 885
Tai Avatar asked Aug 25 '14 21:08

Tai


1 Answers

Apt-get is a package manager but apparently not installed on the flavour of Linux that you are using. A quick google for 'AWS EC2 package manager' tells me that the Amazon Linux flavour uses the yum package manager so "yum install firefox" should get you there. I'm not sure Firebug can be installed in the same way though...

like image 121
Cronax Avatar answered Sep 17 '22 13:09

Cronax