Installing after build phantomjs 2.0 on linux - linux

i followed the instructions here: http://phantomjs.org/build.html then i build it on linux (ubuntu), after this i get on this point "This produces a build bin/phantomjs. This is an executable; it can be moved to a different directory (e.g. /usr/local/bin) or another machine."
Yes it's there, an executable, but how i install it now? i tried using the commands phantomjs on terminal, i only had succes if i install it trough the command sudo apt-get install phantomjs or sudo npm install phantomjs
after this i run the code phantomjs -v and get the version: 1.9
i tried to run my code with phantomjs 1.9 but he ask's for 2.0
and i dont know how to install this exec file or use it to install the phantomjs 2.0, already tried to execute the file by double clicking, and using the command ./phantomjs on the directory... Also tried to run like windows, you go to directory which is the .exe file and then run the command normal like, phantomjs code.js but i doesn't work.
Sorry for this newbie question, im new with linux, starting using it this week.

Related

How to install node.js and npm on Ubuntu terminal using WSL2 in windows 10

I have problem with installing node.js and npm on my Ubuntu terminal (WSL2).
I tried to follow this instructions:
https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-wsl
https://github.com/MicrosoftDocs/windows-uwp/blob/docs/hub/dev-environment/javascript/nodejs-on-wsl.md
Also see some videos on YouTube, but every time I have same error.
First, I run this command:
sudo apt-get install curl
after I am trying to install nvm, with this command :
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
after that it tells, that nvm is installed, but shows some errors(I will include img)
and after that, I can't run this command to verify versions of node.js and npm :
command -v nvm //or this command
nvm ls
I already installed node.js in my windows, and when I open git bash and run this commands node -v and npm -v it shows me, which versions are installed.
But as I use Ubuntu terminal with fish, I wanted to install node.js and npm on it too. Can someone tell me what I am doing wrong?
I believe this may be because you need to restart your terminal, this is one of the troubleshooting tips given from the NVM github page.
There are not any errors when downloading so it is probably just that the .bashrc file was updated but not ran (you should be able to use source ~/.bashrc instead of restarting)

NodeJS on Windows 10 and Windows Subsystem for Linux

I'm trying to get Expo, a platform for making native mobile apps, to run on a Windows 10 machine. A preprequisite for Expo is NodeJS so I installed that. However, I ran into some issues getting Expo to work using Git Bash and so now I'm trying to get Windows Subsystem for Linux (WSL) operational to use that instead. Ubuntu 18.04 LTS has been downloaded and initialized. Using a CMD here is what's happening:
C:\Users\jason.black>node -v
v12.13.0
C:\Users\jason.black>wsl
jason#PC1:/mnt/c/Users/jason.black$ node -v
Command 'node' not found, but can be installed with:
sudo apt install nodejs
jason#PC1:/mnt/c/Users/jason.black$ sudo apt install nodejs
[sudo] password for jason:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package nodejs
jason#PC1:/mnt/c/Users/jason.black$
So it appears that NodeJS which was initially installed is not available to WSL. Does that seem right? And why won't it install so WSL can access it?
If you're trying to access Node installed on the windows site, you may specify the PATH to /mnt/x/.../path/to/node/bin; if you're trying to install nodejs on the Linux side, may be you're looking for the package 'node' (not nodejs), or you can just download the portable version: https://nodejs.org/dist/v12.13.1/node-v12.13.1-linux-x64.tar.xz
For someone who's not familiar to Linux:
# will be download to home directory
cd ~
# using wget
wget https://nodejs.org/dist/v12.13.1/node-v12.13.1-linux-x64.tar.xz
# using curl
curl -o node-v12.13.1-linux-x64.tar.xz https://nodejs.org/dist/v12.13.1/node-v12.13.1-linux-x64.tar.xz
# extract
tar xf node-v12.13.1-linux-x64.tar.xz

Problems installing Pycharm

I am trying to install pycharm on my linux OS.
following the instructions pycharm/dowload.
Since I run a linux machine I made sure the pychrarm files in the current directory:
ietX220:~$ ls
Desktop pycharm-community-4.0.1
Documents Music
pycharm-community- 4.0.1.tar.gz
Downloads New Folder Templates
Dropbox octave-workspace Videos
examples.desktop Pictures VirtualBox VMs
jdk1.8.0_25 Public Win7-PV2hh-6c3HY-
QJHM9-8RJJH-P86W8.iso
ietX220:~$ pycharm-*.tar.gz
pycharm-community-4.0.1.tar.gz: command not found
As you can see the pycharm file is in the current(home) directory but is not found.
Then I opened the tar file made pycharm.sh executable:
chmod +x pycharm.sh
And then ran:
~/pycharm-community-4.0.1/bin$ ./pycharm.sh
Startup Error: Application cannot start in headless mode
What am I doing wrong?
I am having the same issue. It looks like maybe you and I both have a minimal (headless) Java install on our systems. Use your system's method for finding installed packages and search for Java, and i'll bet you find only openjdk-headless
yum list installed | grep openjdk
# or on debian-based systems
# dpkg --get-selections | grep openjdk
# =>java-1.7.0-openjdk-headless
Solution then is to install the same package without the "-headless" suffix.
Here's where I am getting my information for the solution: https://bugzilla.redhat.com/show_bug.cgi?id=1177379
I had the same problem and as mentioned before the error was that openjdk was headless. What i did is i installed from the begining openjdk using the command apt-get install default-jdk (for ubuntu). I know it's not the best way to do it, however it is rather quick and simple.
If you have already all the prerequisites (such as Java) installed, try out charmy (PyCharm installer for Linux).
virtualenv charmy-env
source charmy-env/bin/activate
pip install charmy
charmy install
That will install PyCharm into your home directory. It will also simplify your feature PyCharm upgrades. To upgrade you would just have to type
charmy install
instead of downloading distribution manually, unpacking it, etc.
See https://pypi.python.org/pypi/charmy for more.
PYcharm is now available as a snap. Can be easily installed as below
sudo apt update && sudo apt install snapd
Then the community edition can be installed by
sudo snap install pycharm-community --classic
The classic escape is to get snaps that have been published with classic confinements
220:~$ pycharm-*.tar.gz
pycharm-community-4.0.1.tar.gz: command not found
gz files are not executable files. I think the current directory is not in your PATH variable. To get around that you would do "./pycharm-community-3.0.1.tar.gz" and you should see the message "Permission denied" as the gz file would not have execute permission. And if you gave it execute permission it would say "cannot execute binary file: Exec format error".
These are the instructions from the JetBrains website:
Copy the pycharm-*.tar.gz to the desired installation location
(make sure you have rw permissions for that directory)
Unpack the pycharm-*.tar.gz using the following command:
tar xfz pycharm-*.tar.gz
Remove the pycharm-*.tar.gz to save disk space (optional)
Run pycharm.sh from the bin subdirectory
NOTE: PyCharm on Linux doesn't need special installation or running
any installation script. It runs out of the pycharm-*.tar.gz
If you run the command "tar xfz pycharm-*.tar.gz" you should end up with a directory in your current directory named "pycharm-community-4.0.3".
If you cd pycharm-community-4.0.3/bin, "ls -al" should show that pycharm.sh is already executable. Run pycharm.sh and you should be done. The script will prompt for a password at the end so it can put a startup script in a system directory. You must have admin privileges for that part to work. But if you don't, you can still start PyCharm by executing "[path to pycharm directory]/bin/pycharm.sh &" at the command prompt.
I am not sure what the "NOTE:" is saying, but I would ignore it as you get a working PyCharm by doing what it says above the NOTE: .
Setup the newest stable jdk(like jdk1.7 or jdk 1.8) in your system, and set it is the default jdk.
1.download JDK8
2.SET JAVA HOME
sudo gedit /etc/environment
export JAVA_HOME=/home/username/Java/jdk1.8
export JRE_HOME=/home/username/Java/jdk1.8
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
sudo gedit /etc/profile
//before umask xxx adde
export JAVA_HOME=/home/username/Java/jdk1.8
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$JAVA_HOME/bin
3. run pycharm
./pycharm.sh

Couldn't find libtoolize command in cygwin

I am trying to configure apache thrift and i have installed cygwin to be able run the bash scripts on windows and i have installed libtool package as well and i still seem to be getting an error message:
couldn't find libtoolize!
I have also tried this in the DOS prompt and the bash shell as well, although you cant un bash scripts in the DOS window.
When I run a bash script. I would like some help with this please as I'm really interested in using the apache thrift platform.
'libtoolize' is a part of libtool.
You can dowload latest version of libtool from http://ftp.gnu.org/gnu/libtool/, extract it, then run ./configure and make install from cygwin terminal.
This worked for me.

Error installing Nodejs on CentOS 5 server - no module bz2

I'm trying to get NodeJS installed on my CentOS 5 server
I got Python 2.6 installed, and I got ./configure to work, but when I run the make command I get this result
[root#catch24dev node-v0.8.6]# make
make -C out BUILDTYPE=Release V=1
....
Traceback (most recent call last):
File "../../tools/js2c.py", line 36, in <module>
import bz2
ImportError: No module named bz2
make[1]: *** [/usr/local/src/node-v0.8.6/out/Release/obj/gen/libraries.cc] Error 1
make[1]: Leaving directory `/usr/local/src/node-v0.8.6/out'
make: *** [node] Error 2
[root#catch24dev node-v0.8.6]# which bzip2
/usr/local/bin/bzip2
I, too, got the same error as Marius Milliunas when I ran make on Centos 6.4 - That was after I ran the ./configure command in the nodejs directory, which I had extracted from the downloaded nodejs tarball. Just as Marius Milliunas did.
The root of the problem is that the nodejs installation relies on Python being installed. Specifically, the default Python installation for Centos 6.4 does NOT include the bz2 module and corrective action, of course, starts with installing the bz2 module. This is done by running
yum install bzip2-devel
I also ran for good measure
yum install bzip2
The built-in Python for Centos 6.4 is Python 2.6.6 but that's fine for the purpose of installing the latest version of nodejs, which as of this writing is node v0.10.26
Once you have run yum install bzip2-devel , you can go back and run make in the nodejs directory and this time, make will run to completion. Follow up by running make install as per the instructions set in the nodejs directory.
You can test your nodejs installation by running node and getting the prompt. I chose to test by creatind a nodejs-based web server, as described in http://code.tutsplus.com/tutorials/real-time-chat-with-nodejs-socketio-and-expressjs--net-31708
I knew all was cool with the world and that I had properly installed nodejs on Centos 6.4 when I followed this instruction
The server is running, so you should be able to open http://127.0.0.1:3700/ and see:
It works!
and got the "It works" output, as expected :)
Important Note
If you are additionally installing Python 2.7.6 and Python 3.3.4 on the Centos 6.4 machine, follow the instructions on this link: https://www.digitalocean.com/community/articles/how-to-set-up-python-2-7-6-and-3-3-3-on-centos-6-4
Installing Python 2.7.6 and Python 3.3is purely optional. Note that the last step of installing Python 2.7.6 and Python 3.3.4 is
make altinstall
and NOT "make install" I ran "make install" by mistake and destroyed my access to system Python, which is Python 2.6.6, and my access to yum. In fact, I surmise that I destroyed my access to every program on Centos 6.4 that relies on access to system Python to work properly. If I had successfully installed nodejs by that point in time, I would have destroyed my access to nodejs, too. I had to destroy and recreate /usr/local/bin/python2 as the soft link to /usr/local/bin/python2.6 and do the same with /usr/bin/python2 to get things back to normal. Not much fun.
Note that another solution to this issue (unable to compile node.js) is to use the binary distributions for Linux which have been published since 0.8.6
Here's the script I used:
# get the latest stable binary
# (modify version number based on what you find in that folder)
wget http://nodejs.org/dist/latest/node-v0.8.20-linux-x64.tar.gz
cd /usr/local/
sudo tar xzvf ~/node-v0.8.20-linux-x64.tar.gz --strip=1

Resources