I try to install watir-webdriver on fedora linux. I ran this commands :
cat << EOF > /etc/yum.repos.d/ruby.repo
[ruby]
name=ruby for Fedora \$releasever - \$basearch - Base
baseurl=http://mirror.nl.ergo-project.org/repositories/custom-f13-ruby/x86_64/
failovermethod=priority
enabled=1
gpgcheck=0
[ruby-extra]
name=ruby extra for Fedora \$releasever - \$basearch - Base
baseurl=http://mirror.nl.ergo-project.org/repositories/feature-f13-ruby-1.9.1/x86_64/
failovermethod=priority
enabled=1
gpgcheck=0
EOF
yum -y --enablerepo=ruby,ruby-extra install ruby ruby-devel ruby-irb
gem update --system
gem install watir-webdriver
But When I ran the default script which is available on official website but I have the error
./firewatir:3:in `require': no such file to load -- watir-webdriver (LoadError)
from ./firewatir:3:in `<main>'
Can somebody help me ?
Since you've installed the library as a gem, you need to load Rubygems before watir-webdriver, i.e.:
require "rubygems"
require "watir-webdriver"
Related
Question
How to fix the Cannot download repodata/repomd.xml: All mirrors were tried for docker-ce.
Problem
Get the error Cannot download repodata/repomd.xml: All mirrors were tried with yum install docker-ce by following the current (as of 2021DEC13) Docker documentations to setup Docker yum/dnf repositories.
Install Docker Engine on Fedora
Install Docker Engine on RHEL
Steps & Error
$ sudo dnf -y install dnf-plugins-core
Last metadata expiration check: 0:43:20 ago on Wed 15 Dec 2021 03:47:53 AM UTC.
Package dnf-plugins-core-4.0.21-3.el8.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
$ sudo dnf config-manager \
> --add-repo \
> https://download.docker.com/linux/fedora/docker-ce.repo
Adding repo from: https://download.docker.com/linux/fedora/docker-ce.repo
$ sudo yum update
Docker CE Stable - x86_64 357 B/s | 383 B 00:01
Errors during downloading metadata for repository 'docker-ce-stable':
- Status code: 404 for https://download.docker.com/linux/fedora/8/x86_64/stable/repodata/repomd.xml (IP: 13.224.175.42)
Error: Failed to download metadata for repo 'docker-ce-stable': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Environment
Reproduced with 8.4 and 8.5. However, other Fedora/RHEL/CentOS would have the same issue.
$ cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="8.5 (Ootpa)"
Cause
The commands specified in the Docker documentations generates incorrect repository configurations.
As per Changes to dockerproject.org APT and YUM repositories, the repository for docker is now moved to download.docker.com. The document links to the Docker documentations such as Install Docker Engine on Fedora.
What do I need to do?
If you are currently using the APT or YUM repositories from dockerproject.org or dockerproject.com, please update to use the repositories at download.docker.com.
You can find instructions for CentOS, Debian, Fedora and Ubuntu in the documentation.
You follow the instruction:
$ sudo dnf config-manager \
--add-repo \
https://download.docker.com/linux/fedora/docker-ce.repo
The command creates /etc/yum.repos.d/docker-ce.repo which has wrong URL.
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://download.docker.com/linux/fedora/$releasever/$basearch/stable # <--- Wrong URL
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
As explained in Unable to install docker on rhel 8 linux, it should have been:
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://download.docker.com/linux/centos/$releasever/$basearch/stable # <--- Correct URL
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/centos/gpg
Not sure who should fix this. Please advise who is in charge.
Solution
Use the command below for RHEL/Fedora instead of the one specified in the Docker documentation.
sudo dnf config-manager \
--add-repo=https://download.docker.com/linux/centos/docker-ce.repo
If the incorrect configuration has been already created.
sed -i -e 's/baseurl=https:\/\/download\.docker\.com\/linux\/\(fedora\|rhel\)\/$releasever/baseurl\=https:\/\/download.docker.com\/linux\/centos\/$releasever/g' /etc/yum.repos.d/docker-ce.repo
To simplify #mon solution
edit this file /etc/yum.repos.d/docker-ce.repo
If you're using fedora:
then compare the example below with your file (make sure
you have the word fedora in the baseurl and the gpgkey)
If you're using a different distro (like centos):
then everywhere that you see the word fedora replace it
with the word centos.
example:
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://download.docker.com/linux/fedora/$releasever/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
[docker-ce-stable-debuginfo]
name=Docker CE Stable - Debuginfo $basearch
baseurl=https://download.docker.com/linux/fedora/$releasever/debug-$basearch/stable
enabled=0
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
[docker-ce-stable-source]
name=Docker CE Stable - Sources
baseurl=https://download.docker.com/linux/fedora/$releasever/source/stable
enabled=0
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
[docker-ce-test]
name=Docker CE Test - $basearch
baseurl=https://download.docker.com/linux/fedora/$releasever/$basearch/test
enabled=0
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
[docker-ce-test-debuginfo]
name=Docker CE Test - Debuginfo $basearch
baseurl=https://download.docker.com/linux/fedora/$releasever/debug-$basearch/test
enabled=0
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
[docker-ce-test-source]
name=Docker CE Test - Sources
baseurl=https://download.docker.com/linux/fedora/$releasever/source/test
enabled=0
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
[docker-ce-nightly]
name=Docker CE Nightly - $basearch
baseurl=https://download.docker.com/linux/fedora/$releasever/$basearch/nightly
enabled=0
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
[docker-ce-nightly-debuginfo]
name=Docker CE Nightly - Debuginfo $basearch
baseurl=https://download.docker.com/linux/fedora/$releasever/debug-$basearch/nightly
enabled=0
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
[docker-ce-nightly-source]
name=Docker CE Nightly - Sources
baseurl=https://download.docker.com/linux/fedora/$releasever/source/nightly
enabled=0
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
I am running Centos Stream 9, which is a different animal. Like the others had said, I edited /etc/yum.repos.d/docker-ce.repo
But instead of .../linux/rhel/$releas..
change to .../linux/centos/$rel...
It may be that need to change $rel.. to /8/
docker is not supported for RHEL 86x_64x
i saw a solution to edit the .repo file inside /etc/yum.repos.d/docker-ce****.repo and edit the [docker-ce-stable] baseurl to
https://download.docker.com/linux/centos/$releasever/$basearch/stable
centos will work with RHEL.
I created an Elastic Beanstalk Environment
ID_LIKE="rhel fedora"
VERSION_ID="2016.03"
PRETTY_NAME="Amazon Linux AMI 2016.03"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2016.03:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
I'm trying to install xdebug using
sudo yum install php-pecl-xdebug
But I keep get the following error
Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package php-pecl-xdebug.x86_64 0:2.2.3-1.5.amzn1 will be installed
--> Processing Dependency: php(api) = 20090626-x86-64 for package: php-pecl-xdebug-2.2.3-1.5.amzn1.x86_64
--> Processing Dependency: php(zend-abi) = 20090626-x86-64 for package: php-pecl-xdebug-2.2.3-1.5.amzn1.x86_64
--> Running transaction check
---> Package php-common.x86_64 0:5.3.29-1.8.amzn1 will be installed
--> Processing Conflict: php56-common-5.6.21-1.124.amzn1.x86_64 conflicts php-common < 5.5.22-1.98
--> Finished Dependency Resolution
Error: php56-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
What should I be using instead? And for reference how do I figure out which packages are available?
Thanks alot.
The php-pecl-xdebug depends on the default version of PHP for Amazon Linux, 2.3. Since you have PHP 5.6 installed, you're getting a conflict.
Unfortunately, it looks like Amazon Linux only has packages for xdebug up to PHP 5.5:
[ec2-user#ip-xxx-xxx-xxx-xxx ~]$ sudo yum search xdebug
Loaded plugins: priorities, update-motd, upgrade-helper
============================= N/S matched: xdebug ==============================
php-pecl-xdebug.x86_64 : PECL package for debugging PHP scripts
php54-pecl-xdebug.x86_64 : PECL package for debugging PHP scripts
php55-pecl-xdebug.x86_64 : PECL package for debugging PHP scripts
Name and summary matches only, use "search all" for everything.
Since there is a PECL package, you can install it through that:
[ec2-user#ip-xxx-xxx-xxx-xxx ~]$ sudo yum install php-pear php56-devel gcc
[ec2-user#ip-xxx-xxx-xxx-xxx ~]$ sudo mount -o remount,exec /var/tmp/
[ec2-user#ip-xxx-xxx-xxx-xxx ~]$ sudo pecl install xdebug
[ec2-user#ip-xxx-xxx-xxx-xxx ~]$ sudo mount -o remount,noexec /var/tmp/
Nodejs version 4 has been released and installed on my windows machine.
I'm trying to install the package trough yum on redhat but i'm not getting the latest version.
i tried: sudo yum install -y nodejs but the lastest 4.0 version is not installed.
How do i install nodejs 4.0 on a redhat machine?
NodeJS 4.X for EL7 repos located at https://rpm.nodesource.com/pub_4.x/el/7/
To install with yum change baseurl in nodesource-el.repo file to:
baseurl=https://rpm.nodesource.com/pub_4.x/el/7/$basearch
/etc/yum.repos.d/nodesource-el.repo content:
[nodesource]
name=Node.js Packages for Enterprise Linux 7 - $basearch
baseurl=https://rpm.nodesource.com/pub_4.x/el/7/$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
[nodesource-source]
name=Node.js for Enterprise Linux 7 - $basearch - Source
baseurl=https://rpm.nodesource.com/pub_4.x/el/7/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
gpgcheck=1
You can compile and install from its source.
ver=4.0.0
wget -c https://nodejs.org/dist/v$ver/node-v$ver.tar.gz #This is to download the source code.
tar -xzf node-v$ver.tar.gz
cd node-v$ver
./configure && make && sudo make install
https://github.com/nodejs/node-v0.x-archive/wiki/Installation
Try npm install n -g and then n latest for downloading it with this version manager.
Edit:
The official distributions are managed by Nodesource. For RHEL the setup is supposed to be (take from the repo):
Current instructions for installing, as listed on the Node.js Wiki:
Note that the Node.js packages for EL 5 (RHEL5 and CentOS 5) depend on the EPEL repository being available. The setup script will check and provide instructions if it is not installed.
Run as root on RHEL, CentOS, CloudLinux or Fedora:
curl -sL https://rpm.nodesource.com/setup | bash -
Then install, as root:
yum install -y nodejs
But be aware that 4.0 is currently not in their rpm distribution
This was my solution and it worked:
Distrubution url: Distr: https://nodejs.org/dist/v4.2.1/node-v4.2.1.tar.gz (v4.2.1 for now)
Unpack the package (tar Jxf node-v4.2.1.tar.xz).
Some package could be too old and will cause problems during installation.
cd to the unpacked file and run ”./configure”. if the warming “C++ compiler too old, need g++ 4.8 or clang++ 3.4” is displayed you need to execute the following commands:
curl http://linuxsoft.cern.ch/cern/scl/slc6-scl.repo > /etc/yum.repos.d/slc6-scl.repo
rpm --import http://ftp.mirrorservice.org/sites/ftp.scientificlinux.org/linux/scientific/51/i386/RPM-GPG-KEYs/RPM-GPG-KEY-cern
yum install -y devtoolset-3
And to utilize it without having to set environment variables execute this command:
scl enable devtoolset-3 bash
Now restart the process:
./configure
make
make install
You can try this solution.
First, update software repository to the latest versions:
yum -y update
Intall "Development Tools". It's a group of tools for compiling software from sources.
yum -y groupinstall "Development Tools"
Move to /usr/src directory - the usual place to hold software sources.
cd /usr/src
Now, we pick the latest compressed source archive from Node.js website at http://nodejs.org/download/.
wget http://nodejs.org/dist/v4.2.4/node-v4.2.4.tar.gz
tar zxf node-v4.2.4.tar.gz
cd node-v4.2.4
./configure
make
make install
I'm developing a website on fedora linux. I want to run test. So I choose watir & ruby development to test.
So I wan to install watir on my system but I have errors :
I ran this script
cat << EOF > /etc/yum.repos.d/ruby.repo
[ruby]
name=ruby for Fedora \$releasever - \$basearch - Base
baseurl=http://mirror.nl.ergo-project.org/repositories/custom-f13-ruby/x86_64/
failovermethod=priority
enabled=1
gpgcheck=0
[ruby-extra]
name=ruby extra for Fedora \$releasever - \$basearch - Base
baseurl=http://mirror.nl.ergo-project.org/repositories/feature-f13-ruby-1.9.1/x86_64/
failovermethod=priority
enabled=1
gpgcheck=0
EOF
yum --enablerepo=ruby,ruby-extra install ruby ruby-devel
gem update --system
gem install firewatir
gem uninstall activesupport
gem install activesupport --version '=2.3.8'
But I have failure on test running. I enter in a ruby console (just running irb command) and when I require 'firewatir' it is ok (the console show me true) but when I create a new test ff=Firewatir::Firefox.new
I have irb(main):002:0> ff=Firewatir::Firefox.new
ArgumentError: Anonymous modules have no name to be referenced by
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:585:into_constant_name'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:391:in qualified_name_for'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:104:inrescue in const_missing'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:94:in const_missing'
from (irb):2
from /usr/local/bin/irb:12:in'`
might be a permissions thing
Did you install as a privileged user?
I can't figure out what is going wrong here -- any ideas??
I'm running on a Ubuntu 8.04 LTS, and have installed libxml2 and libxslt from these instructions:
http://www.techsww.com/tutorials/libraries/libxml/installation/installing_libxml_on_ubuntu_linux.php
http://www.techsww.com/tutorials/libraries/libxslt/installation/installing_libxslt_on_ubuntu_linux.php
However, I installed the latest versions:
libxslt-1.1.24
libxml2-2.7.3
The install was uneventful
-------------------- I set LD_LIBRARY_PATH ----------------------------------
echo $LD_LIBRARY_PATH
/usr/local/libxslt/lib:
------------- seems like the function is present -- at least based on the output of strings ------------
/usr/local/libxslt/lib$ strings * | grep ParseStylesheetDoc
xsltParseStylesheetDoc
xsltParseStylesheetDoc
xsltParseStylesheetDoc
xsltParseStylesheetDoc
xsltParseStylesheetDoc
xsltParseStylesheetDoc
xsltParseStylesheetDoc
----------------------- But the compile still fails ----------------------------------------
sudo gem install webrat
Building native extensions. This could take a while...
ERROR: Error installing webrat:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb install webrat
checking for iconv.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2... yes
checking for libxml/parser.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2... yes
checking for libxslt/xslt.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2... yes
checking for libexslt/exslt.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2... yes
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... no
libxslt is missing. try 'port install libxslt' or 'yum install libxslt-devel'
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-iconv-dir
--without-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/lib
--with-xml2-dir
--without-xml2-dir
--with-xml2-include
--without-xml2-include=${xml2-dir}/include
--with-xml2-lib
--without-xml2-lib=${xml2-dir}/lib
--with-xslt-dir
--without-xslt-dir
--with-xslt-include
--without-xslt-include=${xslt-dir}/include
--with-xslt-lib
--without-xslt-lib=${xslt-dir}/lib
--with-xml2lib
--without-xml2lib
--with-xsltlib
--without-xsltlib
Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/nokogiri-1.3.3 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/nokogiri-1.3.3/ext/nokogiri/gem_make.out
In Ubuntu you need to follow these steps:
sudo apt-get install libxml2-dev
sudo apt-get install libxslt-dev
Jared Evans in this post on his blog, described a solution that worked for me on Ubuntu 8.04 LTS. His trick is to NOT use apt-get to install rubygems, but rather to build it from source. This worked great for me. His post is directed at installing rails, so I used these (modified slightly) steps from it to just install nokogiri:
FIRST INSTALL RUBY WITH APT-GET:
sudo apt-get update
sudo apt-get install ruby irb ri rdoc ruby1.8-dev libzlib-ruby
libyaml-ruby libreadline-ruby libncurses-ruby libcurses-ruby libruby
libruby-extras libfcgi-ruby1.8 build-essential libopenssl-ruby
libdbm-ruby libdbi-ruby libdbd-sqlite3-ruby sqlite3 libsqlite3-dev
libsqlite3-ruby libxml-ruby libxml2-dev
IN ADDITION TO JARED'S INSTRUCTIONS I ALSO INSTALLED (I'm not certain that libxslt1.1 is necessary):
sudo apt-get install libxslt1.1
sudo apt-get install libxslt1-dev
DOWNLOAD RUBYGEMS SOURCE:
Download the latest RubyGems (currently 1.3.6) from rubyforge (I used the zip package).
BUILD RUBYGEMS:
cd /TO/DIRECTORY/WHERE/YOU/UNZIPPED/rubygems-1.3.6/
sudo ruby setup.rb
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
INSTALL NOKOGIRI:
sudo gem update –system
sudo gem install nokogiri
The response will be:
1 gem installed
Installing ri documentation for nokogiri-1.4.1...
No definition for parse_memory
No definition for parse_file
No definition for parse_with
No definition for get_options
No definition for set_options
Installing RDoc documentation for nokogiri-1.4.1...
No definition for parse_memory
No definition for parse_file
No definition for parse_with
No definition for get_options
No definition for set_options
I haven't yet noticed any problems caused by the 'No definition' messages...
Try removing the libxslt* and install them again. That fixed the issue for me.
You have to install the development kits of these libraries.
I get the same error when trying to install to a non-standard location (as I don't have access to directories outside my home directory). It seems as if this answer simply installed to the default location in /usr for success. Or did I misunderstand?
More context about what I'm trying to do at http://groups.google.com/group/nokogiri-talk/browse_thread/thread/c1e909be09e90f5a, if that's helpful.
Here's what worked for me on Ubuntu 11.04 (natty):
sudo apt-get install libxslt-dev libxml2-dev
sudo gem install nokogiri