Closed luckypoem closed 7 years ago
as per ur aticle: http://dacav.roundhousecode.com/pages/pft.html ,i ran "cpan App::PFT",still encountered error: ... /usr/bin/make -- OK Running make test Skip blib/lib/auto/share/module/App-PFT/templates/dump_page.html (unchanged) Skip blib/lib/auto/share/module/App-PFT/templates/minimal.html (unchanged) Skip blib/lib/auto/share/module/App-PFT/templates/default.html (unchanged) No tests defined for App::PFT extension. DACAV/App-PFT-v1.1.0.tar.gz Tests succeeded but one dependency not OK (PFT) DACAV/App-PFT-v1.1.0.tar.gz [dependencies] -- NA Running make install make test had returned bad status, won't install without force.
how to fix it?
Hi @luckypoem ,
sorry for my late answer! I didn't see it. Does the problem still happens with newer versions?
newer versions of what? newer versions of perl? what's the minimum perl version?
I've recently released a new version of PFT/App-PFT, Both packages moved to 1.2.0, while when you compiled the version was still 1.1.0.
The minimum perl version is 5.16. I guess perl's version isn't your problem :)
Uh, a couple of heads up:
i recloned the repo:
cd /usr/local git clone https://github.com/dacav/App-PFT app-pft-site cd app-pft-site cpan File::ShareDir::Install perl Makefile.PL
this time i didn't encounter any error.
but, root@localhost:/usr/local/app-pft-site# perldoc App::PFT You need to install the perl-doc package to use this program. root@localhost:/usr/local/app-pft-site#
how to install the perl-doc package? tks
hi. i use "apt-get install perl-doc" to install perl-doc successfully.but, root@localhost:/usr/local/app-pft-site# perldoc App::PFT No documentation found for "App::PFT". root@localhost:/usr/local/app-pft-site#
so where to see the documentation?
Hi there :)
Probably want to use cpan
directly instead of installing from the github repo. In your commands you are using cpan
already, so I think you should simply go for cpan App::PFT
. This should install the whole thing, and place the documentation in the right position.
I understand from your commands you are using a debian-like system. I don't know if under debian cpan
is configured to have an installation prefix which doesn't mess with your operating system (e.g. by overwriting system-installed modules) therefore I would suggest you to investigate if that move is sane, before doing a system-wide installation. An alternative could be not to running it as root: if you run it as regular user, go for the local::lib
installation method (as suggested by the cpan
command when you run it the first time).
A couple of suggestions I can give you by looking at your commands:
Cloning the github repo will not deliver your PFT site. This project doesn't provide a website, but a toolkit to generate websites. You probably want to install it, then go for pft init
in some directory (under your $HOME) and installing the result of a pft make
.
Running perl Makefile.PL
will just generate a Makefile, not installing anything. That's why you don't find documentation btw :). If you want to install from github directly you should run cpan .
in the cloned repo, but first you should do the same for the PFT
library, and for sure you should check out versions of both beforehand. Thant's why I would suggest to directly go for the version in CPAN.
Two unrelated but precious advices:
/usr/local
with random stuff. /usr/local
is supposed to be the prefix for custom installed items: something populated by your make install
scripts. You probably want to clone repositories in your regular user's home :)If you still have some problems, let me know :) Cheers
hello.
finally i make it in another vps by "cpan App::PFT".the site i setup is http://pft-site.smt.biz.st/ ,but how to publish a new page/post?
Hello @luckypoem
Nice! Happy to see it worked :)
In order to publish pages/posts you run the pft edit
command first. This will spawn your editor. When you've got your content, you go for a pft make
and pft pub
.
I see you have some text in your welcome page already. I guess you did a pft edit -P welcome
, right? You can simply pft edit -B some title here
to do a blog post, or pft edit -P About Goats
to edit the "About Goats" page. The pft edit --help
command (or equivalently, man pft edit
) should give you any detailed info you need.
Modifying by hand a content file (e.g vim content/pages/welcome
) is not breaking anything, but you miss out the automatism behind pft edit
).
I took the liberty of renaming this issue, since it's more like a "how to boostrap" thread :)
hello.
'pft-edit -B test-1' let me into a vim interface.but i'm not familiar with vim,how to let me into a nano interface?
You can define the editor in three ways
pft.yaml
configuration file (under system/editor). The pft init
command has defined it initially by looking at your EDITOR
environment variable. In the unlikely event in which that variable is not set, pft init
will default on vim;--editor
flag of pft edit
every time (pft edit ... --editor=nano
);pft.yaml
, the pft edit
command will always try to use the EDITOR
environment variable.hello.
in my first vps:
root@localhost:~# rm -rf ~/.cpan/ root@localhost:~# cpan App::PFT
CPAN.pm requires configuration, but most of it can be done automatically. If you answer 'no' below, you will enter an interactive dialog for each configuration option instead.
Would you like to configure as much as possible automatically? [yes]
Would you like me to automatically choose some CPAN mirror sites for you? (This means connecting to the Internet) [yes] Fetching with HTTP::Tiny: http://cpan.develooper.com/authors/01mailrc.txt.gz Reading '/root/.cpan/sources/authors/01mailrc.txt.gz' ............................................................................DONE Fetching with HTTP::Tiny: http://cpan.develooper.com/modules/02packages.details.txt.gz Reading '/root/.cpan/sources/modules/02packages.details.txt.gz' Database was generated on Sat, 10 Jun 2017 03:41:02 GMT HTTP::Date not available ............. New CPAN.pm version (v2.16) available. [Currently running version is v2.00] You might want to try install CPAN reload cpan to both upgrade CPAN.pm and run the new version without leaving the current session.
...............................................................DONE Fetching with HTTP::Tiny: http://cpan.develooper.com/modules/03modlist.data.gz Reading '/root/.cpan/sources/modules/03modlist.data.gz' DONE Writing /root/.cpan/Metadata App::PFT is up to date (v1.2.0). root@localhost:~# which pft-init root@localhost:~# root@localhost:~# which pft-make root@localhost:~# which pft-edit root@localhost:~#
why there isn't pft-init,pft-make,pft-edit?
On Fri, Jun 09, 2017 at 11:06:14PM -0700, luckypoem wrote:
root@localhost:~# which pft-init root@localhost:~# which pft-make root@localhost:~# which pft-edit
why there isn't pft-init,pft-make,pft-edit?
Just guessing, could it be that the path where they are installed is not listed in your PATH environment variable?
By the way, in line of principle you should call pft init
, pft make
and
pft edit
instead of pft-init
, pft-make
and pft-edit
. The idea is
that it works as a toolkit, in a similar way as for git
you call git init
and not the git-init
program directly. That said, as in git
, you
won't have any bad surprise if you call directly the dashed variant
-- 010 Giovanni [dacav] Simoni 001 dacav@openmailbox.org 111 OpenPGP key: 93FC 2A6A 43A4 AAC2 0D8E 5411 2F99 ABB6 BA14 DF9E
HELLO.
when i run "cpan App::PFT", how to designate the installation path?
Hi luckypoem,
when i run "cpan App::PFT", how to designate the installation path?
In general you don't need to do much: cpan will do the Right Thing.
I usually do it as user, not as root: when using local::lib you get configurations for your PATH in your ~/.profile file.
It's very likely that cpan supports some configuration for changing installation path, if you really have special needs...
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
hi.
root@localhost:~# cpan App::PFT it shows: ... Writing /root/.cpan/Metadata App::PFT is up to date (v1.2.0). root@localhost:~# which pft root@localhost:~# find / -name pft root@localhost:~#
why pft just doesn't exist at all? it's very strange.
any idea?
On Mon, Jun 12, 2017 at 01:25:02AM -0700, luckypoem wrote:
root@localhost:~# cpan App::PFT it shows: ... Writing /root/.cpan/Metadata App::PFT is up to date (v1.2.0). root@localhost:~# which pft root@localhost:~# find / -name pft root@localhost:~#
why pft just doesn't exist at all? it's very strange.
any idea? root@localhost:~#
Well, I quickly tried to spawn a docker container with Debian and to install App::PFT via cpan as you do. Everything works as normal, and I can find pft in /usr/local/bin/pft.
As side-effect of this attempt, my conclusions are:
It's fine to install it via cpan as root: it goes in /usr/local/. In this thread I expressed a doubt/curiosity about the safety of this approach. I never verified how it works safe, and I'm happy to see that it does (under Debian; can't tell in other distros);
I'm guessing you installed, removed manually and tried to re-install. If I do it on my docker container, I'm getting the same "issue". I'm of course lacking of details on what you did in your machine, so it's just a guess. If I'm correct, then this has nothing to do with App-PFT, but with your own setup.
As last comment, you were clearly able to boostrap your PFT site (you have a site working), so I think this "issue" should be closed. But feel free to open another issue if you (actually) find a problem.
Cheers :)
-- 010 Giovanni [dacav] Simoni 001 dacav@openmailbox.org 111 OpenPGP key: 93FC 2A6A 43A4 AAC2 0D8E 5411 2F99 ABB6 BA14 DF9E
yes ,u are correct. i removed manually the files in my first vps: /usr/local/bin/pft-init /usr/local/bin/pft-edit /usr/local/bin/pft-pub /usr/local/bin/pft /usr/local/bin/pft-make /usr/local/bin/pft-ls /usr/local/bin/pft-clean /usr/local/bin/pft-show /usr/local/bin/pft-grab
then i ran "cpan App::PFT", then i encounter the above error,so how to fix it?
tks very much
On Mon, Jun 12, 2017 at 08:34:59AM -0700, luckypoem wrote:
then i ran "cpan App::PFT", then i encounter the above error,so how to fix it?
Your cpan installation has marked App::PFT as installed, so it will refuse to install it again, of course.
Have you tried something as simple as forcing the installation? The cpan command has a very reasonable flag for this. I've tried and it works.
-- 010 Giovanni [dacav] Simoni 001 dacav@openmailbox.org 111 OpenPGP key: 93FC 2A6A 43A4 AAC2 0D8E 5411 2F99 ABB6 BA14 DF9E
hello.
aha,this time it's ok:
root@localhost:~# cpan -f -i App::PFT it shows: ... Installing /usr/local/bin/pft-make Installing /usr/local/bin/pft-show Installing /usr/local/bin/pft Installing /usr/local/bin/pft-init Installing /usr/local/bin/pft-clean Installing /usr/local/bin/pft-ls Installing /usr/local/bin/pft-pub Installing /usr/local/bin/pft-edit Installing /usr/local/bin/pft-grab Appending installation info to /usr/local/lib/perl/5.18.2/perllocal.pod DACAV/App-PFT-v1.2.0.tar.gz /usr/bin/make install -- OK root@localhost:~# root@localhost:~# which pft /usr/local/bin/pft root@localhost:~#
tks
hello.
but i'm happy a little earlier: root@localhost:/usr/local/app-pft-site# pft-make Unknown regexp modifier "/n" at /usr/local/bin/pft-make line 203, at end of line Execution of /usr/local/bin/pft-make aborted due to compilation errors. root@localhost:/usr/local/app-pft-site# pft make Unknown regexp modifier "/n" at /usr/local/bin/pft line 170, at end of line Unknown regexp modifier "/n" at /usr/local/bin/pft line 173, at end of line Execution of /usr/local/bin/pft aborted due to compilation errors. root@localhost:/usr/local/app-pft-site#
how to fix it? tks very much
root@localhost:# cpan -f -i App::PFT
Well done :) The other thing happened to you is a real issue, but unrelated to your boostsrap phase. Let me open another issue for that.
@luckypoem https://github.com/dacav/App-PFT/issues/3
hi.
root@AR:/usr/local/app-pft-site# perl Makefile.PL Can't locate File/ShareDir/Install.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.16.0/i686-linux /usr/lib/perl5/site_perl/5.16.0 /usr/lib/perl5/5.16.0/i686-linux /usr/lib/perl5/5.16.0 .) at Makefile.PL line 7. BEGIN failed--compilation aborted at Makefile.PL line 7. root@AR:/usr/local/app-pft-site#