Cloud9 C codes running failure - docker

First, I running Cloud9 on Docker (using with linuxserver/cloud9) on Raspbian
and installed build-essential on Cloud9
When I tried to run C code (such as printing hello world), it says
Compiling /code/first_c.c ...
cc first_c.c -o first_c
bash: line 6: node: command not found
Process exited with code: 127
Should I install something more? or how can I solve it?

If you just want to run C code, you don't need node, but you have to first install gcc by opening a terminal and running:
sudo apt update && sudo apt install gcc
Then check that your runner is C (simple) and that you have uncheck the icon Run in debug mode.
If you want to run in debug mode you have to install node and gdb with:
sudo apt install nodejs gdb
== Update ==
P.S.: When gdb is not installed, C9 shows wrongly :
"gdbserver" is not installed
This is a bug: corrected by this (yet) non-merged PR.

Related

Install anchor-cli on windows using cargo

Installed anchor-cli on windows, but when I try to view the version I get this message. I don't think that I should be installing this globally.
Only x86_64 / Linux distributed in NPM package right now.
Trying globally installed anchor.
Could not find globally installed anchor, install with cargo.
Is this issue localised in the tag argument used (--tag v0.24.1) and if so, should I use an older version? Command used to install anchor
cargo install --git https://github.com/project-serum/anchor --tag v0.24.1 anchor-cli --locked
Try installing anchor without the --tag
cargo install --git https://github.com/project-serum/anchor anchor-cli --force
Alternative: Open Powershell or CMD in admin mode.
Type "winver" to check your OS version.
You need Windows 10 and above to install Windows Subsystem for Linux.
Enable WSL on Windows:
On you search bar, type
Turn windows features on or off
and find
Windows Subsystem for Linix
can check the box to turn it on
and click "OK" to save the settings.
Enable WSL by running this command on CMD or Powershell in admin mode:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
It will tell you if you need to restart your system, but restart anyway.
Next step:
Go to the Microsoft store and search for
linux
and install your prefered package
Ubuntu
After the installation, restart your system again.
Next step:
Open the Ubuntu application your just installed.
This will install some further packages.
Choose your new username and password and write it down somewhere you'll remember.
The password will not be visible so make sure there are no mistakes.
Press Enter and you will now see the output.
Next Step:
Open Vscode and open and open a new wsl terminal and install anchor using this command
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install -y pkg-config build-essential libudev-dev

Failing to install VEP dependencies

I'm trying to install VEP, but am getting stuck installing its dependencies.
I try to install as suggested here https://www.ensembl.org/info/docs/tools/vep/script/index.html
cd ~/bin
git clone https://github.com/Ensembl/ensembl-vep.git
cd ensembl-vep
perl INSTALL.pl
But I get this error:
ERROR: DBI module not found. VEP requires the DBI perl module to function
http://www.ensembl.org/info/docs/tools/vep/script/vep_download.html#requirements
So, I then try and install DBI as suggested here https://www.ensembl.org/info/docs/tools/vep/script/vep_download.html#requirements
cpanm DBI
But I get this error:
Can't write to cpanm home '/Users/michaelflower/.cpanm': You should fix it with chown/chmod first.
How to I 'fix' it with chown/chmod??
On Ubuntu 20.04 this worked for me:
sudo apt install libdbi-perl
But then I ran into a bunch of other errors which I solved sequentially by doing these things (I restarted the installation after every step but I guess if you first do them all, then it should work in 1 go):
sudo apt update # Or you'll more errors
sudo apt install unzip
sudo apt install build-essential
sudo apt install libbz2-dev liblzma-dev zlib1g-dev
sudo apt install libcam-pdf-perl
cpan Bio::DB:HTS # Takes a while as well
This perl modules wants to install
cpan Bio::SeqFeature::Lite # Takes quite a while
Which wants to install:
cpan XML::DOM XML::Parser::PerlSAX XML::Twig
Which then ultimately fails with:
Files=109, Tests=72, 4 wallclock secs ( 0.28 usr 0.09 sys + 2.29 cusr 0.83 csys = 3.49 CPU)
Result: FAIL
Failed 103/109 test programs. 32/72 subtests failed.
make: *** [Makefile:837: test_dynamic] Error 255
MIROD/XML-Twig-3.52.tar.gz
one dependency not OK (XML::Parser); additionally test harness failed
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports MIROD/XML-Twig-3.52.tar.gz
So I try to install XML::Parser
cpan XML::Parser
and it fails too
Note that if you build against a shareable library in a non-standard location
you may (on some platforms) also have to set your LD_LIBRARY_PATH environment
variable at run time for perl to find the library.
No 'Makefile' created TODDR/XML-Parser-2.46.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
I'll ddg some more...
... ok, I just reran to original install command and it crashes with a new message, it wants me to intall LWP::Simple. So I do, on my first attempt it crashed with a permissions error so I add sudo
sudo cpan LWP::Simple
Restarting install...
perl INSTALL.pl
SUCCESS!

PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_sqlite.so' with Jenkins

I'm getting this warning when running the phpunit test suite in Jenkins pipeline.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_sqlite.so' - /usr/lib/php/20160303/pdo_sqlite.so: undefined symbol: sqlite3_column_table_name in Unknown on line 0
However this warning is not thrown when running the test suite directly in terminal.
I have PHP 7.1 in my system and this is the only PHP version I have installed. php7.1-sqlite3 is installed.
Thank you in advance.
As far as I have found out, there is a faulty file in /usr/local/lib called libsqlite3.so.0 which points to libsqlite3.so.0.8.6. I renamed the file in case it was needed for something. With the command:
cd /usr/local/lib
sudo mv libsqlite3.so.0 ./libsqlite3.so.0.back
But you can also delete it:
rm libsqlite3.so.0
The thread that lead me to the answer: link
This solved my problems, and I hope they solve yours as well :)
I had this same issue with PHP 7.1 on Ubuntu 16.04.
Running the following fixed the issue for me:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.1-sqlite3
Have you built SQLite from source? If yes, enable Column metadata and recompile with
CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1" ./configure
make
sudo make install
Have fun using the cutting edge SQLite.
Reference - https://www.sqlite.org/compile.html#enable_column_metadata

erlang is no longer supported by Red Hat Enterprise Linux?

I'm trying installing Erlang on my REHL7.2, but unfortunately I failed. I tried two approaches
First I tried downloading a RPM package from official site of erlang (in fact the rpm package is for CentOS, but there's no RPM package for RHEL anyway), but
error: Failed dependencies:
libwx_baseu-2.8.so.0()(64bit) is needed by esl-erlang-19.0-1.x86_64
libwx_baseu-2.8.so.0(WXU_2.8)(64bit) is needed by esl-erlang-19.0-1.x86_64
Then I tried
$ wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
$ rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
But it failed too because
No package erlang available.
Error: Nothing to do
I wonder whether Erlang is no longer supported by RHEL? Otherwise how can I install Erlang on my RHEL7.2?
One simple solution to install the Erlang Solutions package is install the epel repository:
yum install epel-release
Then
wget https://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
sudo yum install erlang
The epel repo contains the libwx_* libraries required.
As instructed here:
enter link description here
Run the following commands (note: the commands on the above link use R15B01, but in the following commands, I changed it to the last release of Erlang (R15B03) It will take a while to finish with the installation. Run commands line by line
sudo yum install gcc glibc-devel make ncurses-devel openssl-devel autoconf
wget http://erlang.org/download/otp_src_R15B03.tar.gz
tar zxvf otp_src_R15B03.tar.gz
cd otp_src_R15B03
./configure && make && sudo make install
After everything is done, you will be still at otp_src_R15B03 where Erlang is installed. Type erl and Enter, then, it should run and open Erlang prompt. I tried running Erlang from my home directory and from the root by just typing erl and it worked too. This way, Erlang is working good for me. To quit Erlang press CTRL + g then q and Enter
There is another way to install and useful info on this link:
enter link description here
I have figured it out! I found two solutions.
The first solution which is also the easiest way is to install a zero dependency version of erlang, please refer to my another Question. But I only tried this way after installing erlang from source, so if you failed this way, just try the following soltuion.
The other one is to build erlang from source (or by kerl which is essentially the same thing).
Install necessary dependencies:$sudo yum install ncurses-devel openssl-devel *openjdk-devel unixODBC unixODBC-devel
Download source code of erlang, unzip it and cd into the direcotry
sudo ./configure sudo make sudo make install
Please refer to this article.
Thank you everyone!
Try this, worked for me.
wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm
sudo yum install erlang erlang-nox

Installing Rglpk on linux

I am trying to install Rglpk using the install.packages command. I am getting this error :
/bin/sh: line 0: cd: GLPK: No such file or directory
make: *** [GLPK.ts] Error 1
The glpk-dev package is already installed :
rpm -qa| grep glpk-dev
glpk-devel-4.40-1.1.el6.x86_64
Thanks for your help,
Hi what I did was the following as a sudoer
cd usr local
wget http://ftp.gnu.org/gnu/glpk/glpk-4.54.tar.gz
tar xfzv glpk-4.54.tar.gz
mkdir GLPK
./configure
make
make install
then download the Rglpk_0.6-0.tar.gz and install.package the usual way. It is basically the same as what was done here, but as a sudoer:
I got this fixed by running 'sudo make' and 'sudo make install' instead of 'make' and 'make install'. Not sure if this is good practice, someone else be the judge.
cd $HOME
wget http://ftp.gnu.org/gnu/glpk/glpk-4.65.tar.gz
tar xfzv glpk-4.65.tar.gz
mkdir GLPK
./configure
sudo make
sudo make install
Then run install.packages('Rglpk') from within R.
My experience was the following as a sudoer:
install GLPK package: see https://en.wikibooks.org/wiki/GLPK/Linux_OS
install Rglpk:
# install devtools package beforehand. Or, you can download the Rglpk package manually, and then install in R.
# note that the latest version of Rglpk does not work on my Redhat system. Instead, the version 0.6-0 works perfectly.
devtools::install_url("https://cran.r-project.org/src/contrib/Archive/Rglpk/Rglpk_0.6-0.tar.gz")
Testing: in R, try require(Rgplk)

Resources