Compilation failure "configure: error: udev support requested but libudev header not installed" - libusb

I did following on my ubuntu machine:
Git clone https://github.com/libusb/libusb.git
after extraction, ran ./autogen.sh script, this failed with following error:
checking libudev.h usability... no checking libudev.h presence... no
checking for libudev.h... no configure: error: udev support requested
but libudev header not installed
I also tried installing libudev using following command sudo apt-get install libudev-dev but it fails with following error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libudev1 udev
The following NEW packages will be installed:
libudev-dev
The following packages will be upgraded:
libudev1 udev
2 upgraded, 1 newly installed, 0 to remove and 83 not upgraded.
Need to get 1,197 kB of archives.
After this operation, 539 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err:1 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 udev amd64 229-4ubuntu17
404 Not Found [IP: 91.189.88.162 80]
Err:2 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libudev1 amd64 229-4ubuntu17
404 Not Found [IP: 91.189.88.162 80]
Err:3 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libudev-dev amd64 229-4ubuntu17
404 Not Found [IP: 91.189.88.162 80]
Unable to correct missing packages.
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/s/systemd/udev_229-4ubuntu17_amd64.deb 404 Not Found [IP: 91.189.88.162 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_229-4ubuntu17_amd64.deb 404 Not Found [IP: 91.189.88.162 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev-dev_229-4ubuntu17_amd64.deb 404 Not Found [IP: 91.189.88.162 80]
E: Aborting install.
Any help would be greatly appreciated. Thanks.

sudo apt install libudev-dev works on Ubuntu 18.04 LTS

I got this to working. First i installed libudev-dev the hardway.
1.wget http://kr.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev-dev_204-5ubuntu20_amd64.deb and wget http://kr.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_204-5ubuntu20_amd64.deb
Installed these packages using sudo dpkg -i <*.deb>
Now, ran ./autogen.sh under libusb folder.
Configuration completed successfully!

Related

Selenium + Google Colab error: 'chromedriver' executable needs to be in PATH

I'm using the code offered by #korakot-chaovavanich in this thread How to use Selenium on Colaboratory Google?. I really need to have a solution to make it work on Google Colab.
# install chromium, its driver, and selenium
!apt install chromium-chromedriver
!cp /usr/lib/chromium-browser/chromedriver /usr/bin
!pip install selenium
# set options to be headless, ..
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
# open it, go to a website, and get results
wd = webdriver.Chrome('chromedriver',options=options)
wd.get("https://www.google.com")
print(wd.page_source) # results
I've tested in Google Colab, but I have no idea why it fails to work. I tried to look under /usr/lib but I couldn't find any "chromium-browser" folder. I can't figure where chromedriver is being installed to in Google Colab.
Error message from executing this code in Google Colab:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libnvidia-common-410
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg-extra
Suggested packages:
webaccounts-chromium-extension unity-chromium-extension adobe-flashplugin
The following NEW packages will be installed:
chromium-browser chromium-browser-l10n chromium-chromedriver
chromium-codecs-ffmpeg-extra
0 upgraded, 4 newly installed, 0 to remove and 16 not upgraded.
Need to get 68.5 MB of archives.
After this operation, 251 MB of additional disk space will be used.
Ign:1 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 chromium-codecs-ffmpeg-extra amd64 74.0.3729.169-0ubuntu0.18.04.1
Ign:2 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 chromium-browser amd64 74.0.3729.169-0ubuntu0.18.04.1
Ign:3 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 chromium-browser-l10n all 74.0.3729.169-0ubuntu0.18.04.1
Ign:4 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 chromium-chromedriver amd64 74.0.3729.169-0ubuntu0.18.04.1
Err:1 http://security.ubuntu.com/ubuntu bionic-updates/universe amd64 chromium-codecs-ffmpeg-extra amd64 74.0.3729.169-0ubuntu0.18.04.1
404 Not Found [IP: 91.189.88.31 80]
Err:2 http://security.ubuntu.com/ubuntu bionic-updates/universe amd64 chromium-browser amd64 74.0.3729.169-0ubuntu0.18.04.1
404 Not Found [IP: 91.189.88.31 80]
Err:3 http://security.ubuntu.com/ubuntu bionic-updates/universe amd64 chromium-browser-l10n all 74.0.3729.169-0ubuntu0.18.04.1
404 Not Found [IP: 91.189.88.31 80]
Err:4 http://security.ubuntu.com/ubuntu bionic-updates/universe amd64 chromium-chromedriver amd64 74.0.3729.169-0ubuntu0.18.04.1
404 Not Found [IP: 91.189.88.31 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/chromium-codecs-ffmpeg-extra_74.0.3729.169-0ubuntu0.18.04.1_amd64.deb 404 Not Found [IP: 91.189.88.31 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/chromium-browser_74.0.3729.169-0ubuntu0.18.04.1_amd64.deb 404 Not Found [IP: 91.189.88.31 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/chromium-browser-l10n_74.0.3729.169-0ubuntu0.18.04.1_all.deb 404 Not Found [IP: 91.189.88.31 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/chromium-chromedriver_74.0.3729.169-0ubuntu0.18.04.1_amd64.deb 404 Not Found [IP: 91.189.88.31 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
cp: cannot stat '/usr/lib/chromium-browser/chromedriver': No such file or directory
Requirement already satisfied: selenium in /usr/local/lib/python3.6/dist-packages (3.141.0)
Requirement already satisfied: urllib3 in /usr/local/lib/python3.6/dist-packages (from selenium) (1.24.3)
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/selenium/webdriver/common/service.py in start(self)
75 stderr=self.log_file,
---> 76 stdin=PIPE)
77 except TypeError:
4 frames
FileNotFoundError: [Errno 2] No such file or directory: 'chromedriver': 'chromedriver'
During handling of the above exception, another exception occurred:
WebDriverException Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/selenium/webdriver/common/service.py in start(self)
81 raise WebDriverException(
82 "'%s' executable needs to be in PATH. %s" % (
---> 83 os.path.basename(self.path), self.start_error_message)
84 )
85 elif err.errno == errno.EACCES:
WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
The problem comes from a version mismatch between Google Chrome and Chromium Browser, leading to the command apt install chromium-chromedriver to fail. It is probably due to an update from Selenium.
You need to update every packages with the command apt-get update, to avoid version mismatch of your tools.
Try this on colab:
# install chromium, its driver, and selenium
!apt-get update
!apt install chromium-chromedriver
!cp /usr/lib/chromium-browser/chromedriver /usr/bin
!pip install selenium
# set options to be headless, ..
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
# open it, go to a website, and get results
wd = webdriver.Chrome('chromedriver',options=options)
wd.get("https://www.website.com")
print(wd.page_source) # results

when i am trying to install npm it says : 404 Not Found [IP: 91.189.88.149 80] what to do?

Following comes when i am trying to install npm
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.0.2d-0ubuntu1.5_amd64.deb 404 Not Found [IP: 91.189.88.149 80]
Please update your package list: apt-get update
The current version of libssl-dev is 1.0.2g-1ubuntu4.11 (See Ubuntu Packages).
Old versions of packages will be deleted from the ubuntu repository once they are out-of-date long enough. After pulling the new package info, the package manager will install the new version.

How to install apache2 in Ubuntu

I am trying to install apache2 in Ubuntu 12. I installed Ubuntu in Virtual Machine. I have problems. First, my system can not update or upgrade. When I type:
I receive a lot of errors like this:
Err http://security.ubuntu.com quantal-security/main Sources
404 Not Found [IP: 91.189.91.14 80]
At the final line, this is the result:
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.91.13 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
Second, when I try to install apache2. I type:
sudo apt-get install apache2 apache2-doc apache2-utils
Again, it fails. The result:
e#ubuntu:/etc$ sudo apt-get install apache2 apache2-doc apache2-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package apache2
E: Unable to locate package apache2-doc
E: Unable to locate package apache2-utils
e#ubuntu:/etc$
Can you help me plz?
EDIT:
This command does not work either.
sudo apt-get update && sudo apt-get upgrade
I get:
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.91.24 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
The problem is with the OS installation.
use sudo apt-get update && sudo apt-get upgrade. If ou cannot update. Then try to re-install the OS.
After a fresh install of your OS try sudo apt-get install apache2 apache2-doc apache2-utils

Can't update with yum, seeing error PYCURL ERROR 7 - "couldn't connect to host" Alternatives?

I'm trying to update a PHP module using yum, but am getting an error.
Here's what I am trying and seeing :
yum install php-ldap
result :
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security,
: subscription-manager
Updating certificate-based repositories.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-ldap.x86_64 0:5.3.3-3.el6_2.6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
php-ldap x86_64 5.3.3-3.el6_2.6 rhel-x86_64-server-6 36 k
Transaction Summary
================================================================================
Install 1 Package(s)
Total download size: 36 k
Installed size: 0
Is this ok [y/N]: y
Downloading Packages:
Error Downloading Packages:
php-ldap-5.3.3-3.el6_2.6.x86_64: failed to retrieve getPackage/php-ldap-5.3.3- 3.el6_2.6.x86_64.rpm from rhel-x86_64-server-6
error was [Errno 14] PYCURL ERROR 7 - "couldn't connect to host"
I really need to install this module tonight. What are my alternatives ?
Thanks
The problem was that our Network Admin had blocked access to the internet from that machine. Yum was just timing out.

Cannot install Apache Web Server on Ubuntu, Amazon WS

I enter command apt-get install apache2 --fix-missing (under the root user) and this is what I receive:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
ssl-cert
Suggested packages:
apache2-doc apache2-suexec apache2-suexec-custom openssl-blacklist
The following NEW packages will be installed:
apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1 libaprutil1 libaprutil1-dbd-sqlite3
libaprutil1-ldap ssl-cert
0 upgraded, 10 newly installed, 0 to remove and 36 not upgraded.
Need to get 2,945 kB/3,141 kB of archives.
After this operation, 10.4 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://us-west-1.ec2.archive.ubuntu.com/ubuntu/ oneiric-updates/main apache2.2-bin i386 2.2.20-1ubuntu1.1
404 Not Found [IP: 10.161.51.124 80]
Err http://security.ubuntu.com/ubuntu/ oneiric-security/main apache2.2-bin i386 2.2.20-1ubuntu1.1
404 Not Found [IP: 91.189.92.167 80]
Err http://security.ubuntu.com/ubuntu/ oneiric-security/main apache2-utils i386 2.2.20-1ubuntu1.1
404 Not Found [IP: 91.189.92.167 80]
Err http://security.ubuntu.com/ubuntu/ oneiric-security/main apache2.2-common i386 2.2.20-1ubuntu1.1
404 Not Found [IP: 91.189.92.167 80]
Err http://security.ubuntu.com/ubuntu/ oneiric-security/main apache2-mpm-worker i386 2.2.20-1ubuntu1.1
404 Not Found [IP: 91.189.92.167 80]
Err http://security.ubuntu.com/ubuntu/ oneiric-security/main apache2 i386 2.2.20-1ubuntu1.1
404 Not Found [IP: 91.189.92.167 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/a/apache2/apache2.2-bin_2.2.20-1ubuntu1.1_i386.deb 404 Not Found [IP: 91.189.92.167 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/a/apache2/apache2-utils_2.2.20-1ubuntu1.1_i386.deb 404 Not Found [IP: 91.189.92.167 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/a/apache2/apache2.2-common_2.2.20-1ubuntu1.1_i386.deb 404 Not Found [IP: 91.189.92.167 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/a/apache2/apache2-mpm-worker_2.2.20-1ubuntu1.1_i386.deb 404 Not Found [IP: 91.189.92.167 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/a/apache2/apache2_2.2.20-1ubuntu1.1_i386.deb 404 Not Found [IP: 91.189.92.167 80]
Unable to correct missing packages.
E: Aborting install.
Any help is appreciated.
Try running the following command beforehand:
sudo apt-get update
Depending on your installation, you might also want to run
sudo apt-get upgrade
to install package updates.