How do I install an older ethtool version on a machine? - nic

I need to test if some firmware is compatible with older ethtool versions.
The machine I am using currently have ethtool version 5.16, but I need to install ethtool version 5.13
I got the compressed file from https://mirrors.edge.kernel.org/pub/software/network/ethtool/ and have used tar -zxvf https... to extract the files. This extracts a directory with the contents shown below:
After reading the INSTALL file, I ran ./configure but it gave me the following error: configure: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config
This meant that I could not run make or make install and thus am stuck.

After speaking to colleagues, the solution was found:
apt-get install -y pkg-config. Thereafter the following package was also needed: apt-get install -y libmnl-dev
Simple installed it with ./configure, make and make install and saw the ethtool version was as desired.

Related

configure: error: Qtenv cannot find qmake in omnet++ installation

I'm trying to install omnetpp 5.2.1 on windows 10. But getting an error while doing ./configure command related to QT environment. I tried changing the configure.user file in omnetpp package to change the path of QT but still its not working. Here is the error:
configure:error: Qtenv cannot find qmake--maybe it is not in the path
or has some exotic name (tested names were: qmake qmake-qt5 qmake5)-
disabling Qtenv. You can try setting QT_PATH variable in
configure.user to a valid location.
qt5 might not be installed.
sudo apt install qt5-default worked for me while installing on Ubuntu 20.04.
OMNeT++ comes with all dependencies bundled. As long as you have executed the mingwenv.cmd and running from that shell, qmake should be available in the path (in tools/win64/mingw64/bin). Check if qmake.exe is present there. If not, make sure that ZIP file you have downloaded is intact. Standard windows unzip may fail on certain systems...
run ./configure WITH_QTENV = no

Adding Qt Dependencies to spec file in rpmbuild

I'm using Ubuntu 14.04 and I am updating the rpmbuild spec file of an application that now uses Qt.
The packages that I need are the following:
sudo apt-get build-essential
sudo apt-get install mesa-common-dev -y
sudo apt-get install libglu1-mesa-dev -y
sudo apt-get qt5-default
sudo apt-get qtwebengine5-dev
I know the spec file has "BuildRequires" and "Requires" dependency tags...any help in writing this as well as some examples would be helpful. I have a working spec file I just need to add the dependencies.
I think there is some confusion here. spec files are used to generate rpm files. However Ubuntu uses deb files.
Supposing you really want to create an rpm; then you need to know this:
BuildRequires
these packages are required for building the rpm. Typically you will need build-essential and the '*-dev` packages for building your application
Requires
these packages are required upon installation for your application to work; mostly you don't need your build-tools anymore, but you still need the qt5-default for example.
PS: on a little side note I might be one of the only people in the world building deb packages using spec files with a special conversion script https://bitbucket.org/klaussfreire/spec2deb/src/default/ but I wouldn't really recommend that.

Not able to install mod_perl module on the server

In my site I am getting an error : an error occurred while processing this directive
It was working fine before moving to the new server. So when I checked I found that mod_perl module is missing. So I tried to install it by downloading the module to the server and then tried to run using Perl Makefile.pl but it was asking for apache src and I was not able to find it. I can see /usr/bin/apache/ folder but no source file inside the folder.
So I tried to install the module from Cpanel but I got the following error:
The C compiler is not functional and auto repair failed. Perl module installs require a working C compiler. Please repair the C compiler and try again.
Please let me know how to install it as I have tried most of the cases searching the net.
Thanks in advance
It's probably best to use your distro's packaging system to install mod_perl, especially, if apache is installed from a package too.
Yum based systems:
yum install mod_perl
Deb based systems
apt-get install mod_perl
you may need to enable the module using a2enmod
Mostly gcc is either corrupted or not present on your system. Please try to re/install gcc on your system
sudo apt-get update
sudo apt-get install build-essential
On Redhat:
yum update
yum install devtoolset-2-toolchain
It seems like a problem with your installation of gcc. You're using CloudLinux, so you should use yum to reinstall gcc.
$ sudo -i yum install gcc
But you don't need gcc if you install the pre-build packages.
$ sudo -i yum install mod_perl
Either way, you're going to need to get to grips with package installation for your system - and for that you're going to need root access.

pecl install gnupg, could not extract the package.xml

I am having problems installing a package with pecl. My system runs Gentoo Linux. It does not accept the package that I am trying to install.
# pecl install gnupg
downloading gnupg-1.3.3.tgz ...
Starting to download gnupg-1.3.3.tgz (19,141 bytes)
......done: 19,141 bytes
could not extract the package.xml file from "/var/tmp/pear/gnupg-1.3.3.tgz"
Download of "pecl/gnupg" succeeded, but it is not a valid package archive
Error: cannot download "pecl/gnupg"
Download failed
install failed
The tarball looks fine and does indeed have a package.xml...
# tar -zxvf /var/tmp/pear/gnupg-1.3.3.tgz
package.xml
gnupg-1.3.3/tests/gnupg_oo_0001_import.phpt
gnupg-1.3.3/tests/gnupg_oo_encrypt.phpt
gnupg-1.3.3/tests/gnupg_oo_encryptsign.phpt
gnupg-1.3.3/tests/gnupg_oo_export.phpt
gnupg-1.3.3/tests/gnupg_oo_keyinfo.phpt
gnupg-1.3.3/tests/gnupg_oo_listsignatures.phpt
gnupg-1.3.3/tests/gnupg_oo_sign_clear.phpt
gnupg-1.3.3/tests/gnupg_oo_sign_detach.phpt
gnupg-1.3.3/tests/gnupg_oo_sign_detach_nonarmor.phpt
gnupg-1.3.3/tests/gnupg_oo_sign_normal.phpt
gnupg-1.3.3/tests/gnupg_oo_sign_normal_noarmor.phpt
gnupg-1.3.3/tests/gnupg_oo_zzz_deletekey.phpt
gnupg-1.3.3/tests/gnupg_res_0001_import.phpt
gnupg-1.3.3/tests/gnupg_res_encrypt.phpt
gnupg-1.3.3/tests/gnupg_res_encryptsign.phpt
gnupg-1.3.3/tests/gnupg_res_export.phpt
gnupg-1.3.3/tests/gnupg_res_keyinfo.phpt
gnupg-1.3.3/tests/gnupg_res_listsignatures.phpt
gnupg-1.3.3/tests/gnupg_res_sign_clear.phpt
gnupg-1.3.3/tests/gnupg_res_sign_detach.phpt
gnupg-1.3.3/tests/gnupg_res_sign_detach_nonarmor.phpt
gnupg-1.3.3/tests/gnupg_res_sign_normal.phpt
gnupg-1.3.3/tests/gnupg_res_sign_normal_noarmor.phpt
gnupg-1.3.3/tests/gnupg_res_zzz_deletekey.phpt
gnupg-1.3.3/tests/vars.inc
gnupg-1.3.3/config.m4
gnupg-1.3.3/EXPERIMENTAL
gnupg-1.3.3/gnupg.c
gnupg-1.3.3/gnupg_keylistiterator.c
gnupg-1.3.3/LICENSE
gnupg-1.3.3/php_gnupg.h
gnupg-1.3.3/php_gnupg_keylistiterator.h
gnupg-1.3.3/README
It would be good if someone could explain this better and help me fix it. Google results were very discouraging. It seems nobody else is having this problem.
I used to use the package in Gentoo portage dev-php/pecl-gnupg but that only supports 5.3. So I need to use pecl from now on to get the module for PHP 5.5. PHP 5.3 is now EOL.
I worked out how to manually install it...
After extracting the package, change to it's directory and run these commands...
phpize
aclocal
libtoolize --force
autoheader
autoconf
./configure
make
sudo make install

cmake not working, could not exec qmake

I am using Ubuntu 14.04. I'm trying to install a program which requires cmake. When I run cmake src/ I get:
qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
What am I doing wrong?
Does the trick:
sudo apt-get install qt4-qmake
You do not need to install half a gigabyte of qt sdk!
I read on another post that the problem has something to do with CMake not being able to find Qt4 qmake.
However in my case, it was simply a matter of not having qt4-qmake. This solved it (but weighs a heavy 440MB):
sudo apt-get install qt-sdk
For newer versions of Ubuntu, if you have only installed version 5 of the Qt Framework, you may get this error. If you want to use Qt version 5 by default, then you should run the following command to fix the error:
sudo apt install qt5-default
You need the qt dependences:
sudo apt-get install qt4-qmake libqt4-dev
as it says in docs: https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit#debian--ubuntu
sudo apt-get update
sudo apt-get install qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x
works for me in Ubuntu 18.04
You can use QtCreator to compile the cmake project too. This is only advantageous over the accepted answer if you already have QtCreator installed, I notice you are using a qmake project so this might be likely.
The main advantage of this is that qt creator will be configured to use the qmake tool without the need to install the command line configured version of qmake.
Incidentally, I get this error if I try to run the qmake executable bundled with QtCreator on the command line.