When I type cygcheck -c for some packages the results are coming up blank. For example:
$ cygcheck -c apt-cyg
Cygwin Package Information
Package Version Status
<blank> <blank> <blank>
Whereas other packages return:
$ cygcheck -c wget
Cygwin Package Information
Package Version Status
wget 1.19-1 OK
I'm confused because I just used apt-cyg to download a package. When I tried checking ssh package it returns the same as apt-cyg yet I used to login into a vm???
What is the explanation behind this. How come some packages aren't shown but still work?
Thanks!
apt-cyg is not an official cygwin package and it is NOT installed
as the other ones from setup.
For the list of available packages see
https://cygwin.com/packages/package_list.html
Related
Where from should I download virtualenv to use locally from source using wget?
I'm having troubles downloading virtualenv from the command line.
Info: if you search for virtualenv you will find the site for the stable version and its installation guide which is just equals to the latest version installation guide.
To install locally it describe this :
To install version X.X globally from source:
$ curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-X.X.tar.gz
$ tar xvfz virtualenv-X.X.tar.gz
$ cd virtualenv-X.X
$ [sudo] python setup.py install
To use locally from source:
$ curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-X.X.tar.gz
$ tar xvfz virtualenv-X.X.tar.gz
$ cd virtualenv-X.X
$ python virtualenv.py myVE
I'm using wget instead curl but should not be problem at all with this. Am I wrong?
The only place where I can download it (and not from the command line) is from here.
I'm typing the url correctly.
Different virtualenv versions at the url return the same not found:
HTTP request sent, awaiting response... 404 Not Found
2017-07-21 17:53:09 ERROR 404: Not Found.
Please note that I have already downloaded the tar.gz so I don't need it right now but I'm not sure if this is a broken link issue or I'm forgotten something else at the download command. I will not associate an issue to virtualenv just because a broken link but I need to know why this is not working.
EDIT: I can't download it using wget from ..python..packages/source/v/virtualenv etc.
TARGET="https://pypi.python.org/simple/virtualenv/"
PATTERN="virtualenv-15.1.0.tar.gz"
wget --recursive --no-directories --accept=$PATTERN $TARGET
Yes, curl and wget are equivalent for what you're trying.
No, you can download from anywhere. From PyPI, e.g.
There is no functional difference between pip install virtualenv and what you're trying to do but the former is simpler and less error-prone so why bother with manual labour?
How can I efficiently list installed and available packages on Cent OS?
I have already tried yum list installed, which is supposed to output the list of all installed while rpm -qa produces a different result in size.
Which one should I trust? Or am I omitting something?
My understanding is: rpm -qa is better to know what is installed (RPM packages, right! ). Whereas yum is better to know what could be installed and find required dependencies. It is usually fine to use yum for both purposes.
I tested on a CentOS 7 system. They have almost identical list, except that rpm also reports some gpg-pubkey pseudo packages (try rpm -qa gpg-pubkey\*).
If you want to compare the lists on your system, first get the rpm's list:
$ rpm -q -a --qf '%{NAME}\t%{ARCH}\t%{VERSION}\t%{RELEASE}\n' | sort > /tmp/rpm-qa.lst
Then extract YUM's list (using repoquery which is part of package yum-utils:
$ repoquery -q -a --installed --qf '%{NAME}\t%{ARCH}\t%{VERSION}\t%{RELEASE}' | sort > /tmp/repo-qa.lst
Then compare:
$ diff -u0 /tmp/rpm-qa.lst /tmp/repo-qa.lst
--- /tmp/rpm-qa.lst 2015-03-08 16:07:38.297325253 +0100
+++ /tmp/repo-qa.lst 2015-03-08 16:07:43.281438369 +0100
## -143,1 +142,0 ##
-gpg-pubkey (none) 352c64e5 52ae6884
(See also question https://unix.stackexchange.com/q/190203/16640)
Both commands works in the same way only difference is 'yum list installed' output maybe bigger than 'rpm -qa' because yum will show package dependencies also in its output.
While installing a package using rpm, we need to manually install the dependencies whereas yum will do that automatically. So in this case if you want to list the packages only use, 'rpm -qa' or if you need to list all the packages and dependencies associated with it use 'yum list installed'
I installed casperjs for the first time and ran the sample scripts. The first sample script (javascript) ran without incident. Then i tried running a coffescript sample, which I prefer, and received the following error:
Unable to load script test.coffee; check file syntax
I searched for an answer and the solution in the only related issue didn't work for me. I was able to compile the CoffeeScript (test.coffee) into JavaScript (test.js) and then ran the compiled JavaScript, again, without indecent.
I tried to track down the error by searching for the error message in the casperjs files. I found the error message at the end the ~/.node/lib/node_modules/casperjs/bin/bootstrap.js file where it passes control to phantomjs. I created simple a CoffeeScript: test_phantomjs.coffee:
console.log "hello phantomjs"
phantom.exit()
and ran the script (phantomjs test_phantomjs.coffee) with the following result:
Can't open 'test_phantomjs.coffee'
At this point I'm at loss. The problem is more of an inconvenience than anything since compiling into JavaScript solves the issue. Is their something I'm missing?
In Phantomjs2.0 was removed support of coffee-script
https://github.com/ariya/phantomjs/issues/12410
(disclaimer: i'm/was part of contribution team)
the support of coffee script in CasperJS depends on the version of phantomJs you are using because this is phantomjs that provide coffee script support out of box.
You can also use and install slimerjs (https://slimerjs.org) which - from my point of view - is more performant than phantomjs and supports coffeescript scripts.
Mickaƫl
Works for me. Can you post your PhantomJS version and platform?
Mine on Mac OS X:
$ phantomjs -v
1.9.8
Just works:
$ phantomjs test_phantomjs.coffee
hello phantomjs
As others say, PhantomJS v2.x no longer supports CoffeeScript.
Therefore, now you have 2 options to run PhantomJS with CoffeeScript:
Run plain *.coffee files with PhantomJS v1.9.8
Compile *.coffee files to *.js, and run *.js with PhantomJS v2.x
I recommend the latter up-to-date way, and this is how package.json looks like:
{
"scripts": {
"pretest": "npm install && coffee --compile **/*.coffee",
"test": "casperjs test --fail-fast script/*.js",
"watch": "coffee --watch --compile **/*.coffee"
}
}
See more detail at ymkjp/phantomjs2x_coffee_sample.
Btw, here's the way to install PhantomJS v1.9.8 on Ubuntu.
$ sudo apt-get update
$ sudo apt-get install build-essential g++ flex bison gperf ruby perl \
libsqlite3-dev libfontconfig1-dev libicu-dev libfreetype6 libssl-dev \
libpng-dev libjpeg-dev python libx11-dev libxext-dev git
$ cd ~
$ wget -O- https://github.com/ariya/phantomjs/archive/1.9.8.tar.gz | tar zxvf -
$ cd ~/phantomjs-1.9.8
$ bash build.sh # It takes 30 min or so (Up to your host machine)
$ sudo ln -s ~/phantomjs-1.9.8/bin/phantomjs /usr/local/bin
$ phantomjs --version
1.9.8
Cheers.
In cpan shell, only /regexp/ or all modules can be upgrade, if I want to upgrade modules only installed by CPAN,how to do?
I suggest you using cpanm "family" script for perl modules management.
Install cpanm
skip this, if you already have it
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
if you're on freebsd you can use instead curl the command fetch (see: man fetch)
Upgrade cpanm
skip this, if you installed it right now
cpanm --self-upgrade --sudo
Install cpan-outdated
cpanm App::cpanoutdated
The cpan-outdated command do the same as CPAN (r), but IMO better to use from shell
For example, only my notebook gives the result like:
marvin:~ jomo$ cpan-outdated
S/SM/SMUELLER/Attribute-Handlers-0.93.tar.gz
D/DR/DROLSKY/Class-Load-0.20.tar.gz
D/DR/DROLSKY/DateTime-TimeZone-1.47.tar.gz
... etc
Run cpan-outdated & upgrade modules
cpan-outdated -p | cpanm
Changes
If you want see what is changed (Change-log), you can try install cpan-listchanges
cpanm App::cpanlistchanges
and use it like: cpan-listchanges Plack - too see what's changed in Plack between your local and the latest on CPAN
# cpan
cpan> h
Display Information (ver 1.9800)
command argument description
a,b,d,m WORD or /REGEXP/ about authors, bundles, distributions, modules
i WORD or /REGEXP/ about any of the above
ls AUTHOR or GLOB about files in the author's directory
(with WORD being a module, bundle or author name or a distribution
name of the form AUTHOR/DISTRIBUTION)
Download, Test, Make, Install...
get download clean make clean
make make (implies get) look open subshell in dist directory
test make test (implies make) readme display these README files
install make install (implies test) perldoc display POD documentation
Upgrade
r WORDs or /REGEXP/ or NONE report updates for some/matching/all modules
upgrade WORDs or /REGEXP/ or NONE upgrade some/matching/all modules
Pragmas
force CMD try hard to do command fforce CMD try harder
notest CMD skip testing
Other
h,? display this menu ! perl-code eval a perl command
o conf [opt] set and query options q quit the cpan shell
reload cpan load CPAN.pm again reload index load newer indices
autobundle Snapshot recent latest CPAN uploads
Running just the below command will do what you ask.
cpan> upgrade
$ cpan Module
and
cpan> install Module
will upgrade if a newer version is available, and do nothing if you already have the latest version.
You should first log into cpan. Then, once at the prompt type:
r [enter]
That will print out a list of upgradable modules that are installed. After you have that list to work off of you can use the following:
cpan upgrade <MODULE NAME>
Simply replace with the name of the module to upgrade.
Regards,
Jeff
reinstalling the perl package will automatically upgrade using
cpanm --reinstall <Module_Name>
I'm trying to install Maatkit following the maatkit instructions. I can't get past having to install DBD::mysql. "Warning: prerequisite DBD::mysql 1 not found."
When I try to install DBD::mysql from cpan, I get very helpful "make had returned bad status, install seems impossible".
Perl is "v5.8.8 built for darwin-thread-multi-2level", the one that came with OS X. I also tried building from source with same result.
We need more of the error message. Most likely, you are missing the MySQL client development files. I don't know how to install these on OSX. Also see this older post on OSX 10.5.2 , in which some other failures with the mysql client libraries are found.
Possibly post this question with more parts of your error message at perlmonks.org, if stackoverflow doesn't allow for convenient pasting of your make session or rather the last 20 or 10 lines of it.
Some more Googling with site:perlmonks.org also finds this post which has some more details on things to watch out for when installing DBD::MySQL. Depending on how comfortable you feel with the installation, you might want to manually run the tests, supplying a test database and test user or even skip testing the module.
After a bit more googling, this worked for me:
sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql
sudo ln -s /usr/local/mysql/include /usr/local/mysql/include/mysql
sudo perl -MCPAN -e 'install Bundle::DBD::mysql'
press enter a bunch of times, then in your maatkit folder:
perl Makefile.PL
sudo make install
and you'll find the mk-* programs in /usr/local/bin/
You will want to install MySQL first. I usually use the binary packages they provide for OS X. The packages do include the headers and MySQL client libraries which DBD::MySQL requires. Once the MySQL package is installed, DBD::MySQL should install without issue.
Here is my output:
$ perl Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite DBD::mysql 1 not found.
Writing Makefile for maatkit
$ mysql --version
mysql Ver 14.12 Distrib 5.0.51b, for apple-darwin9.0.0b5 (i686) using readline 5.0
I notice that there are in effect DBD::MySQL packages in the fink repositories. For example:
ayaz#ayazs-macbook$ fink list | grep -i 'dbd-mysql'
dbd-mysql-pm586 3.0008-10 Perl5 Database Interface to MySQL
dbd-mysql-pm588 3.0008-10 Perl5 Database Interface to MySQL
Perhaps installing through fink one of those packages may help alleviate your troubles.
Also, and I cannot be certain of this, you may want to install for MySQL-5.x (if you have that version installed) the mysql15-dev and mysql15-shlibs packages. I installed those through fink thus:
$ sudo fink --use-binary-dist install mysql15-dev