Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when copying .../share/man #100

Closed
floer32 opened this issue Feb 16, 2013 · 14 comments
Closed

Error when copying .../share/man #100

floer32 opened this issue Feb 16, 2013 · 14 comments

Comments

@floer32
Copy link

floer32 commented Feb 16, 2013

Using Manjaro Linux 0.83 (XFCE Edition). Installed node 0.8.20 manually then used npm to install n. Have since used n to install several versions of node. Everything seems to be working, including switching node versions (as long as I do sudo but I figure that's given). I do get this error however:

cp: cannot overwrite non-directory ‘/usr/local/share/man’ with directory ‘/usr/local/n/versions/0.9.9/share/man’

Indeed, this is because /usr/local/share/man is a symbolic link to /usr/local/man. Not sure if this is applicable to Arch in general or just Manjaro.

Again, things still seem to be working; all that seems to be faltering is the copying of the man page, and that's fine really. Nonetheless thought it might be worth reporting.

@jasonmorganson
Copy link

I'm on Gentoo and had this same issue. By default /usr/lib is a symlink to /usr/lib64.

Found this discussion on Stack Exchange:
http://superuser.com/questions/534790/cp-into-destination-hierarchy-with-symbolic-link

Looks like on line 245, the cp command isn't capable of supporting symlinks:
cp -fr $dir/* $N_PREFIX

By my eyes using rsync is the cleaner than using find. Though I'm not sure which is more commonly included. As far as I know both of these are included on most systems. Does anyone know if that's true?

I have been testing using rsync and it seems to work well for me. I'll submit a pull request with the change.

@qw3rtman

This comment has been minimized.

@ntrrgc

This comment has been minimized.

@qw3rtman
Copy link
Collaborator

@ntrrgc, what OS are you running?

@ntrrgc
Copy link

ntrrgc commented Sep 25, 2016 via email

@deepsweet
Copy link

same error here with Arch Linux.

@qw3rtman qw3rtman added the bug label Oct 10, 2016
@coproduto
Copy link

Same error happening on Antergos Linux. I'm copying manpages manually from /usr/local/n/versions/node/{version}/share/man to /usr/share/man as a workaround.

@winneon

This comment has been minimized.

@rku4er

This comment has been minimized.

@devzsolt

This comment has been minimized.

@shadowspawn
Copy link
Collaborator

A manual work-around might be to install to a different location using N_PREFIX, and add to PATH or add symbolic links in /usr/local. Likewise, there is third party installer n-install.

(A little history. The suggestion to fix this issue by using rsync instead of cp got rejected in #104. Support got added later to cope with symbolic links as direct subdirectories of /usr/local such as /usr/local/bin in #227, but not deeper in the hierarchy such as /usr/local/share/man.)

@devzsolt
Copy link

Thank you @JohnRGee the recommended n-install solution works like a charm on the latest Manjaro, so possibly on other Arch-based distros too. I also tried installing n from an AUR package called nodejs-n but despite it was prepared for Arch systems it had this same issue with the symlink dir. So n-install is the way to go for now.

@shadowspawn
Copy link
Collaborator

If readers want to install to /usr/local and a fork of n is an option, I have switched to rsync in nvh which avoids this symlink problem.

@floer32
Copy link
Author

floer32 commented Mar 3, 2020

Sorry if other users disagree but since I opened this in 2013 and have not touched arch linux since that year or year after, I'm closing this issue. Arch Linux was a great way to force myself to "live" in the CLI (and I still do today) but even if I went back, I would not expect nonessential conveniences like n to work there. If someone else feels differently they can open another ticket and link this one or something, just casting my "vote" to close it... since I was the OP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants