Failed to compile module vmmon vmware - linux

I'm going to install VMware 8 on debian 6 with 3.2.xx kernel. I've installed it thoroughly and it seemed that there wasn't any error in installing process.but when I want to run VMware workstation it got an error which says:
Failed to compile module vmmon
what is the cause of this error and how can I solve it?
log ouput:
2012-10-11T19:29:37.521+03:30| vthread-3| I120: Building module with command: /usr/bin/make -j -C /tmp/vmware-root/modules/vmmon-only$
2012-10-11T19:29:39.324+03:30| vthread-3| I120: Failed to compile module vmmon!

I user this commands to solve my problem:
# cd /usr/lib/vmware/modules;
# wget http://pavlinux.ru/vmware/8.0.0/source.tar.lzma;
# tar -xf source.tar.lzma;
# vmware-modconfig --console --install-all;

You need to run this command as root after each kernel upgrades :
vmware-modconfig --console --install-all

Solved in this way
Check your version $ vmplayer -v to insert in the script, in my case is 14.1.7
$ vim vmware-repair.sh
press i and paste
#!/bin/bash
VMWARE_VERSION=workstation-14.1.7 #This needs to be the actual name of the appropriate branch in mkubecek's GitHub repo for your purposes
TMP_FOLDER=/tmp/patch-vmware
rm -fdr $TMP_FOLDER
mkdir -p $TMP_FOLDER
cd $TMP_FOLDER
git clone https://github.com/mkubecek/vmware-host-modules.git #Use `git branch -a` to find all available branches and find the one that's appropriate for you
cd $TMP_FOLDER/vmware-host-modules
git checkout $VMWARE_VERSION
git fetch
make
sudo make install
sudo rm /usr/lib/vmware/lib/libz.so.1/libz.so.1
sudo ln -s /lib/x86_64-linux-gnu/libz.so.1 /usr/lib/vmware/lib/libz.so.1/libz.so.1
systemctl restart vmware && vmplayer &
Press ESC then :wq then ENTER
$ chmod +x vmware-repair.sh
$ sudo ./vmware-repair.sh
Source

This could help future users with the same problem
git clone https://github.com/mkubecek/vmware-host-modules
cd vmware-host-modules
git checkout workstation-16.2.3
sudo make ; sudo make install

Related

Failing to install node on kali linux

following thees steps to install node js from git . I am running kali linux 2016
# this way is best if you want to stay up to date
# or submit patches to node or npm
mkdir ~/local
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
# could also fork, and then clone your own fork instead of the official one
git clone git://github.com/joyent/node.git
cd node
./configure --prefix=~/local
make install
cd ..
git clone git://github.com/isaacs/npm.git
cd npm
make install # or `make link` for bleeding edge
I have not sucessfully installed npm. Becuase the error is that command
node
is not found. But i successfully installed node.
even echoed the path. What could be the problem
Using Pre-Compiled Binaries :
Download NodeJS v8.4.0 (x64 Linux)
extract .tar.xz > /opt/node (for example) and create a simbolic link for usage :
ln -s /opt/node/bin/node /usr/bin/node
ln -s /opt/node/bin/npm /usr/bin/npm

How do I install Cppcheck using the tar file on Linux?

I'm trying to install Cppcheck via telnet on a Linux box. I have the cppcheck-1.67.tar file and I untar it. I don't see anything that will install it for me. Am I approaching this the correct way?
Actual on a date publication of this answer.
Download file from there https://sourceforge.net/projects/cppcheck/
Go to the folder with for downloads
cd ~/Downloads/
Unpack archive
tar -xvf cppcheck-1.76.1.tar.bz2
Go to unpacked folder
cd cppcheck-1.76.1/
Install package as root
sudo make install
Check up result
$ which cppcheck
/usr/bin/cppcheck
Testing it
$ touch simple.c
$ echo "int main(){ int a; a + 1; return 0}" > simple.c
$ cppcheck simple.c
Checking simple.c ...
[simple.c:1]: (error) Uninitialized variable: a
This package also exists in a standard repository.
$ aptitude search cppcheck
p cppcheck - tool for static C/C++ code analysis
Testing environment
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.6 (jessie)
Release: 8.6
Codename: jessie
$ uname -a
Linux localhost 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux
The instructions are in the readme.txt file. The short answer is make install.
Remember never to install things from a tar file when you can use your distribution's package manager.
The readme.txt file makes no mention of "make install".
It looks like the supplied Makefile is borked:
It passes "CFG=" param to compile, without DESTDIR
But "make install" prepends DESTDIR to CFGDIR
In my case, I edited Makefile to remove DESTDIR from make install, and cppcheck is happy with that.
For me the magic lines turned out to be the following in Docker on Ubuntu 18.04 (Bionic Beaver):
RUN cd /tmp \
&& git clone https://github.com/danmar/cppcheck.git \
&& cd cppcheck \
&& git checkout 1.72 \
&& make SRCDIR=build CFGDIR=/usr/bin/cfg HAVE_RULES=yes install \
&& cd /tmp \
&& rm -rf /tmp/cppcheck \
&& ldconfig
I assume the following will work for any version. I am not sure where it makes sense to install the configuration to. This works for me:
make SRCDIR=build CFGDIR=/usr/bin/cfg HAVE_RULES=yes install
If you want a later version than in the other answers, and you want to install it, then you can use the bash script below which is up to date and builds on the other answers. It should also clean itself up afterwards. It works for version 2.7 on debian/ubuntu but you can change the git checkout tag and try your luck on newer versions.
installcppcheck.sh
#!/usr/bin/env bash
set -e
cd /tmp
git clone https://github.com/danmar/cppcheck.git
cd cppcheck
git checkout 2.7
make MATCHCOMPILER=yes FILESDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" install
cd /tmp
rm -rf /tmp/cppcheck
ldconfig
cppcheck --version
If you don't have sudo privileges you can follow #Seti Volkylany's answer, replacing step 5 with
OUT_PATH=/home/user/bin # target location of binary
make SRCDIR=build CFGDIR=~/Downloads/cppcheck-1.76.1/cfg PREFIX=$OUT_PATH
make install CFGDIR=$OUT_PATH/cppcheck-1.76.1/cfg PREFIX=$OUT_PATH

Installing Git version above 1.8.5 on Centos

Earlier today, I ran into problems moving git folders (Move Git folder containing submodules), and the recommendation was to use a newer git version above 1.8.5. Easy, I thought, but haven't been so lucky.
I've searched high and low, and the most recent version I could find in a yum repository is 1.8.3 (PUIAS_6_computational: puias.math.ias.edu).
I then looked for help installing by source (http://www.howtoforge.com/how-to-install-the-latest-git-version-on-centos and http://tecadmin.net/install-git-2-0-on-centos-rhel-fedora/ which are almost identical), however, git is only available to the root user, and it is my understanding both these tutorials shouldn't be installing in /usr/local/.
# cd git-2.0.4
# make prefix=/usr/local/git all
# make prefix=/usr/local/git install
# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
# source /etc/bashrc
Please provide a means to use Git version greater than 1.8.5.
Try following this set of instructions:
https://www.digitalocean.com/community/tutorials/how-to-install-git-on-centos-7
Then, do this:
yum remove git
exit
# reopen an terminal
Using Docker you have two options:
If you don't want to install dependencies on your host you could build it with docker, you could try this: https://github.com/wood1986/docker-library/tree/master/git
Or a quick but far from ideal way, you could execute it on a docker container, so every time you run git a container is created, your command is executed and the container is automatically removed and a cleaned up is made.
First: sudo yum remove git
then: sudo vim /bin/git
with this:
#!/bin/bash
docker run -ti --rm -v ${HOME}:/root -v $(pwd):/git alpine/git $#
last: sudo chmod 775 /bin/git
and add .gitconfig with your name and email to your home
Check your version: git --version

How to make a ubuntu executable and run it in my install file

This is the install file below (sandhi-install.sh). Currently after installing it can only be run from the terminal. I want to make it terminal independent. Making a Ubuntu executable explains how to create an executable but where should I put that code. I think it should be in the install file itself because we want the icon to appear on the desktop after installation completes.
I have no prior experience in Shell scripting and bash so sorry if i miss any important information. Please ask if you need any other file. My aim is basically to run sandhi independent of the terminal.
#!/bin/bash
echo "Installing the required dependencies"
sudo apt-get -y install git-core autoconf automake make libtool g++ python-dev swig \
pkg-config libboost1.48-all-dev libfftw3-dev libcppunit-dev libgsl0-dev \
libusb-dev sdcc libsdl1.2-dev python-wxgtk2.8 python-numpy \
python-cheetah python-lxml doxygen python-qt4 python-qwt5-qt4 libxi-dev \
libqt4-opengl-dev libqwt5-qt4-dev libfontconfig1-dev libxrender-dev \
python-serial python-matplotlib
echo "Sciscipy installation starting"
git clone https://github.com/manojgudi/sciscipy-1.0.0.git
cd sciscipy-1.0.0/
sudo ./install
echo "Starting Sandhi installation"
cd ../
git clone http://github.com/manojgudi/sandhi.git
cd sandhi/
git submodule init
git submodule update
git pull origin master
git submodule update
mkdir build
cd build/
cmake ../
make -j 2
sudo make install
sudo ldconfig
echo "Sandhi installation complete. Go to command line and type Sandhi to start Sandhi"
Your script already has all the right ingredients for being a *nix executable - a shebang line and what at least looks like valid code for the interpreter (/bin/bash). All you need to do is to give the relevant user and/or group (or everybody) execute access on the file. For example, if you're the owner of the file:
sandhi#host$ ls -l sandhi.sh
-rw-r--r-- 1 purak users 3.5K Oct 11 16:55 sandhi.sh
sandhi#host$ chmod u+x sandhi.sh
Now you can execute it:
sandhi#host$ ls -l sandhi.sh
-rwxr--r-- 1 purak users 3.5K Oct 11 16:55 sandhi.sh
sandhi#host$ ./sandhi.sh
For the rest of the question it's unclear what you're asking. The accepted answer to Making a Ubuntu executable says that if the executable foo.bin is in /usr/local/bin (a sensible destination for custom executables) the line in the desktop entry should be Exec=/usr/local/bin/foo.bin.

How can I add npm (node.js package manager) to the PATH?

I installed node.js like this:
cd /usr/local/bin/
git clone --depth 1 http://github.com/joyent/node.git
cd node
git checkout origin/v0.4 # optional. Note that master is unstable.
export JOBS=2 # optional, sets number of parallel commands.
mkdir ~/local
./configure --prefix=$HOME/local/node
make
make install
echo 'export PATH=$HOME/local/node/bin:$PATH' >> ~/.profile
source ~/.profile
Then I executed this curl http://npmjs.org/install.sh | sh to install npm. After I logged out and logged back in, npm command wasn't recognized:
[/usr/local/bin/node]# npm install now
-bash: npm: command not found
What should I add to the PATH to have npm working?
Try this:
git clone https://github.com/npm/cli
cd npm/cli
sudo make install
That advice comes from of https://github.com/isaacs/npm#readme.
It is not as cute as curl|sh, but works.
Great news : npm now comes with nodejs !
I am a beginner~, but I want be helpful.
I use centos7, and do you know yum (a tool could download and setup programs like mirosoft Windows)
First, I search keyword "node.js" at wiki.centos, I find this. https://wiki.centos.org/SpecialInterestGroup/SCLo/CollectionsList?highlight=%28node.js%29.
There are two versions of nodejs could be used at the moment, I chose the higher one.
the URL is https://www.softwarecollections.org/en/scls/rhscl/rh-nodejs4/
and the command lines are below:
# Install a package with repository for your system:
# On CentOS, install package centos-release-scl available in CentOS repository:
$ sudo yum install centos-release-scl-rh
# On RHEL, enable RHSCL repository for you system:
$ sudo yum-config-manager --enable rhel-server-rhscl-7-rpms
# 2. Install the collection:
$ sudo yum install rh-nodejs4
# 3. Start using software collections:
$ scl enable rh-nodejs4 bash

Resources