This is not the first time I experience something like that. This time it was with PHPunit.
I wanted to install the library using pear..
pear config-set auto_discover 1
pear install pear.phpunit.de/PHPUnit
The installation fails saying :
No releases available for package "pear.phpunit.de/PHPUnit"
What can I do ?
Thank you
Note :
pear upgrade says that I have the latest version
pear update-channels says that I am up to date
Note2 : I am at work so behing a proxy
Note3: using windows OS
In Windows Explorer, go to your WAMP PHP installation folder (default will be C:\wamp\bin\php\php[version]).
Create a new directory called “PEAR” here.
Download the PEAR phar installer https://phar.phpunit.de/phpunit.phar and place it in the new directory above.
Fire up a cmd window (Start and search for “cmd”) as administrator
Change to your new directory
(default command will be “cd C:\wamp\bin\php\php[version]\PEAR”)
Run the following command: “php go-pear.phar”.
The first thing that the installer will ask is whether you are installing a system wide copy of PEAR. Since you are probably working on a development machine, either is fine. Just press enter to install system wide.
Next, the installer will show you a bunch of paths that it automatically calculated by using it’s current location on your disc.
You mentioned you are behind a proxy, you may then need to set it explicitly, with something like the following:
$ pear config-set http_proxy http://username:password#proxy.example.com:80
I found it in another post. the cache has to be cleared.
pear clear-cache
Related
I am aware how to silently install 'R for Windows', but how could I update an existing installation silently to a new version?
Install switches I am currently using:
\\foo\R\R_4.0.5\R-4.0.5-win.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /ALLUSERS /LANGUAGE=en /COMPONENTS="main, x64, translations" /DIR="C:\Program Files\R"
For me, it seems like there is no supported update/upgrade switch. Just installing a new version over an existing one results in just having 2 versions listed in appwiz.cpl.
Forcing the same install dir is not helping either, as you still end up with 2 installations, just in the same folder.
Any hint is appreciated. Thanks in advance.
UPDATE:
I am trying to keep the installations on several machines aligned - therefor it would be helpful to update all machine installations periodically to the latest version and ensure the software inventory solution is not reporting N versions on a single machine.
R is designed so that you can have multiple versions installed simultaneously. This is why each version installs into a different directory.
The canonical way to handle this is to check a registry key for the latest installed version, but if you want to avoid messing with the registry, you can try this:
Install into a custom directory
When it comes to upgrading, move that directory to a temporary location
Install the newer version into the original location
If it works, delete the temp location
If it doesn't, delete the failed install and restore the original
Caveat: untested.
I got stuck installing "git clone https://gitlab.com/guile-git/guile-git.git". In which directory is this supposed to be cloned and installed?
Dunno if you're still looking for an answer but it doesn't seem you need this installed to install guix; the read-me of the repository says that you can install it via guix. guix is an agnostic package manager that you can install on any Linux distribution alongside the default package manager and guix is the default package manager of the GuixSD operating system (https://www.gnu.org/software/guix/).
If you're on a distro which doesn't use guix, you may not want to install guix (I've yet to find reason enough to, yet); if you use a lot of GNU tools or Guile (some Guile packages are available through guix), you may want to.
Most repositories that don't have a binary for you to run follow the build process of configure, make, and [sudo ]make install.
I cloned the repository, myself, and find that this one does, as well.
Get a terminal (if you haven't been using one, yet) and cd into the directory you cloned the repository to and then cd into the guile-git directory (cd guile-git).
If we do ls -l, we'll see that the only executable file there is the bootstrap one; I've never seen one before but doing ./bootstrap generates the configure file and sets up the make process for us. So now back in familiar territory.
Given these are Guile files, we'll probably want to install this under the same prefix as where Guile is installed so run which guile. I believe, if you install it under Ubuntu (I'm running Linux Mint), it'll install to /usr/bin/ but, if you install it manually, it'll install to /usr/local/bin/.
The latter is where mine is and that's the default prefix that configure uses so I can just do ./configure; if you wanted to install it under /usr/, run /.configure --prefix=/usr/.
This'll verify that all of the necessary libraries and programs that guile-git needs are installed and properly setup. Heads up that configure balked at me over not having the Guile module bytestructures installed (https://github.com/TaylanUB/scheme-bytestructures) so you may need to do that.
I'm not going to run through everything to get it installed but, once you can run it without any errors, run make to build it within the directory.
If you want to install it permanently on your computer with the rest of your operating system able to detect it, run make install. Since you'll likely've specified a directory under /usr, you'll have to do sudo make install so that the make process can have permissions to install under /usr/local or /usr.
Sorry if I reiterated anything you already knew; 'just didn't want to assume you knew something and result in confusion.
I've installed PHPUnit and everything seems to be working fine as when I run phpunit from the root php directory C:\wamp\bin\php\php5.4.16 it runs as expected.
However, the problem I am having is running PHPUnit from elsewhere within the command line, so I cannot run any tests because of this. I get the error
phpunit' is not recognized as an internal or external
command, operable program or batch file.
My path is set correctly C:\wamp\bin\php\php5.4.16 which is where php.exe is installed.
I have also tried re-installing, and am running version 3.7.24.
Anyone have any tips on what I may be doing wrong?
PHPUnit is not set in the PATH global variable. Try installing PHPUnit using PEAR. For win7 use this tutorial: http://designbyjeeba.blogspot.ro/2012/12/easy-way-to-install-pear-and-phpunit-in.html
If PEAR doesn't find any package to install (when trying to install anything using it) clear PEAR's cache:
pear clear-cache
I dont know the way you installed it, but i did it this way and it works fine for me.
Also i recommend installing DBUnit and PHPUnit selenium. Use the following commands:
pear install phpunit/PHPUnit_Selenium
pear install phpunit/DbUnit
For Linux use the commands given by PHP at the following link:
http://phpunit.de/manual/3.7/en/installation.html
I am trying to install PhpUnit skeleton generator. I am also using PhpStorm 5.0.
I get the feeling that it does not install itself properly because when I try to run the skeleton generator it gives me an error saying:
'phpunit-skelgen.bat' not found at...
Also, it seems that pear does install it in my pear folder under the SebastianBergmann\PHPUnit\SkeletonGenerator folder, which seems odd since I would have expected it in the main pear folder.
Any ideas?
Problem solved.
That's because the phpunit-skelgen.bat file is actually installed in the php folder, not in pear. So just search for it in the root of the php installation folder.
I get Cannot open file "FooTest.php"
I am using PHP 5.4.0 and PHPUnit 3.6 on Windows
I have traced the issue back to PHPUnit\Util\Filesystem.php when it calls get_include_path which contains "." and the location to pear.
For some reason it doesn't resolve . to where the tests are as it resolves it locally to the PHPUnit location.
How do I get phpunit to recognise the location of the tests.
First make also sure your PHPUnit installation and all dependencies are up-to-date:
pear upgrade phpunit/PHPUnit --alldeps
In case your pear installation is messed up you can also obtain it from the github repository.
Depending on how your project and enviroment is set up make sure your current directory is your projects directory.
cd /your/projects/home/directory/
The common syntax to invoke phpunit is either
phpunit [switches] <your_unit_test.php>
or
phpunit [switches] <directory>
So, basically in case your tests are stored within directory YourUnitTests the easiest way to start it would be just to use
phpunit YourUnitTests