unable to install PHPunit on my local machine - phpunit

I am Trying to install phpunit on my local mac machine, but I got the followings error when I ran the command below:
sudo pear install pear.phpunit.de/PHPUnit
parse error in /private/etc/php.ini on line 786

Check /private/etc/php.ini on line 786. There would be some parsing error.
After solving that,you can refer following blog for PHPUnit installation.
Installing PHPUnit On Windows

Related

RStudio Server (community) can't find libR.so even though it is in path

Note: I have filed this as an issue, but I'm not sure if it is really a bug or just something I need to resolve about my system configuration.
This seems to be a library that causes many people trouble with RStudio and RStudio Server. Often people can fix the problem by reinstalling the core R libraries with apt or manually copying or linking the libR.so file to a place where RStudio finds it.
In my case, I'm using a Conda instance for my R executable.
My instance was working and stopped after upgrading my ubuntu 22.04 VM. I tried some things to fix the problem but have not succeeded.
System details
RStudio Edition : Server
RStudio Version : 2022.07.2+576 (Spotted Wakerobin) for Ubuntu Bionic
OS Version : Ubuntu 22.04.1 LTS
R Version : 4.1.3 (2022-03-10) -- "One Push-Up"
Describe the problem in detail
I have a GCP VM running ubuntu 22.04 which I use for RSS.
I did a sudo apt update && sudo apt dist-upgrade and a restart. RSS stopped working. I ran sudo rstudio-server verify-installation and received
/usr/lib/rstudio-server/bin/rsession: error while loading shared libraries: libR.so: cannot open shared object file: No such file or directory
I decided to reinstall RSS using:
wget https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2022.07.2-576-amd64.deb
sudo gdebi rstudio-server-2022.07.2-576-amd64.deb
and did not receive any errors during installation. However I received the same error as above with verify-installation. I then tried doing conda update --all -y. This also did not fix the problem.
Here is some useful information:
(base) balter#rstudio:~$ which R
/home/balter/conda/bin/R
(base) balter#rstudio:~$ head -n3 /etc/rstudio/rserver.conf
# Server Configuration File
rsession-which-r=/home/balter/conda/bin/R
(base) balter#rstudio:~$ find . -name "libR.so"
./conda/lib/R/lib/libR.so
./conda/pkgs/r-base-4.1.3-h7880091_3/lib/R/lib/libR.so
(base) balter#rstudio:~$ sudo rstudio-server verify-installation
TTY detected. Printing informational message about logging configuration. Logging configuration loaded from '/etc/rstudio/logging.conf'. Logging to '/var/log/rstudio/rstudio-server/rserver.log'.
/usr/lib/rstudio-server/bin/rsession: error while loading shared libraries: libR.so: cannot open shared object file: No such file or directory

Cloudera installation failure

I am trying to install Cloudera on Centos7, when I install it using the command sudo ./cloudera-manager-installer.bin, it shows the message that
Cloudera Manager 5 is already installed. please uninstall it (by running /usr/share/cmf/uninstall.sh) before attempting to install it again.
When I try uninstalling it by running sudo /usr/share/cmf/uninstall.sh , it shows
No such file or directory
I tried uninstalling everything using the script, sudo yum remove 'cloudera-manager-*'
and then removed the guid file:
sudo rm /var/lib/cloudera-scm-agent/cm_guid
And tried reinstalling it, but it still shows the same Fatal error meesage as seen above. Can someone please help?
I removed the folder cmf using rm -rf /usr/share/cmf and its working, thanks.

.net core raspberry pi 3 Error: Download failed

I try to follow the guide bellow to install .net core on my raspberry pi 3:
https://www.microsoft.com/net/core#debian
The script told me to install below:
dotnet_install: Error: Unable to locate libunwind. Install libunwind to continue
dotnet_install: Error: Unable to locate gettext. Install gettext to continue
i install them using apt-get install, and everything fine:
sudo apt-get install libunwind-dev
sudo apt-get install gettext
but no luck, when i run below :
sudo curl -sSL https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.sh | bash /dev/stdin --version 1.0.0-preview1-002702 --install-dir ~/dotnet
i got:
dotnet_install: Error: Download failed
Are there any missing?
Please use last valid URL:
curl -sSL https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview1/scripts/obtain/dotnet-install.sh | bash /dev/stdin --version 1.0.0-preview1-002702 --install-dir ~/dotnet
And it downloads and installs successfully on latest Raspbian on Raspberry Pi 2 (I think there should be no problem with Raspberry Pi 3).
However, after successful install, there is a error:
bash: dotnet: cannot execute binary file: Exec format error
I believe this is because of ARM architecture, because currently only amd64 (x64) is supported.

dalekjs error on running any tests scripts on Ubuntu

Hi i've been using a lot of dalekjs in my companies mac, but when I try it in ubuntu I get this error when running any scripts
~/Desktop/test $ dalek test.js
Running tests
Running Browser: PhantomJS
>> ERROR: SyntaxError: Unexpected token E
~/Desktop/test $
I have followed all the instructions properly in installing dalekjs the same way I have installed it in my mac and this is the first time I get this kind of error. Can you guys tell me if I missed installing something to make dalekjs run? Thanks!
I got it working, I think it was the installation process is where I went wrong. I installed everything globally and locally.
So this time I uninstalled all dalekjs packages locally and globally and then followed this process
sudo npm install dalek-cli -g
sudo npm install dalekjs
and it worked out just fine for me

phpUnit - File/Iterator/Autoload.php failed opening

I am trying to get phpUnit running on a centos running plesk pannel.
I have installed phpunit successfully.
Package Version State
File_Iterator 1.3.1 stable
PHPUnit 3.6.10 stable
PHPUnit_MockObject 1.1.1 stable
PHP_CodeCoverage 1.1.2 stable
PHP_Invoker 1.1.0 stable
PHP_Timer 1.0.2 stable
PHP_TokenStream 1.1.3 stable
Text_Template 1.1.1 stable
however whenever i run the phpunit command from the shell i get the following error:
PHP Warning: require_once(File/Iterator/Autoload.php): failed to open
stream: No such file or directory in
/usr/share/pear/PHPUnit/Autoload.php on line 45
PHP Fatal error:
require_once(): Failed opening required 'File/Iterator/Autoload.php'
(include_path='.:') in /usr/share/pear/PHPUnit/Autoload.php on line 45
Has anyone a clue how to solve the problem?
I tried a billion different articles and the commands that finally fixed this issue for me were the following:
sudo pear channel-discover pear.phpunit.de
sudo pear install --alldeps --force phpunit/phpunit
Then, when I ran phpunit, I didn't get the errors and it ran successfully.
I'm not sure how this translates for plesk, but the problem is the include_path specified in your php.ini file is set to just the current directory. Verify where your php.ini file is by running the following from the command line...
% php --info
...and look for the following entries...
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
In this case, edit /etc/php.ini and look for the for include_path. In my case I need to set it as follows...
include_path = ".:/opt/php-5.3.14/lib/php/pear"
Your include path must include the directory where PEAR installs all those packages. Add /usr/share/pear to your include path in php.ini--probably /etc/php5/cli/php.ini.
On the Ubuntu (10.04) I also added /usr/share/php to the /etc/php5/cli/php.ini.
In Fedora release 19 it has been solved by adding the /usr/share/pear/ path to the include_path of /etc/php.ini

Resources