简体   繁体   English

使用 svn 从命令行签出代码的问题

[英]Issues on using svn to check out code from command line

On my working directory, I tried to check out the code as follows:在我的工作目录上,我尝试检查代码如下:

svn co http://svn.apache.org/repos/asf/mahout/trunk

But the system says:但是系统说:

zsh: command not found: svn

Does that mean that I did not install svn correctly.这是否意味着我没有正确安装 svn。 How to fix that?如何解决?

More likely, it means that the svn executable is not on the system path.更有可能的是,这意味着 svn 可执行文件不在系统路径上。 Create a symbolic link to it in /usr/bin在 /usr/bin 中创建指向它的符号链接

ln -s /full/path/to/executable/svn /usr/bin/svn

UPDATE:更新:

I was going for the path of least resistance, but @derobert is right about root or sudo privileges needed for that.我打算走阻力最小的道路,但@derobert 是正确的,因为它需要 root 或 sudo 权限。 Never think about it, because I'm never a restricted user.永远不要考虑它,因为我从来都不是受限用户。 Appending to PATH is probably the only way a restricted user can do it:附加到PATH可能是受限用户可以做到的唯一方法:

export PATH='$PATH:/full/path/to/svn/bin'

Ideally, that should go in one of your user preference startup scripts.理想情况下,应该在您的用户偏好启动脚本之一中使用 go。 It's usually something like ~/.profile .它通常类似于~/.profile In bash, it's ~/.bash_rc or in some cases ~/.bash_profile .在 bash 中,它是~/.bash_rc或在某些情况下是~/.bash_profile Not sure about in Zsh, though, but look for something along those lines.不过,不确定是否在 Zsh 中,但可以在这些方面寻找一些东西。

You may want to search to see if svn is installed on your box...您可能想搜索一下您的盒子上是否安装了 svn...

you an do a 'which svn'你做一个'which svn'

if nothing returns.. make sure you PATH variable is set to where your binaries are stored..如果没有返回.. 确保将 PATH 变量设置为存储二进制文件的位置..

If you are referring to the SVN plugin in eclipse, that is not the same thing as the command line implementation of SVN.如果你指的是eclipse中的SVN插件,那和SVN的命令行实现不是一回事。 They are two separate packages.它们是两个独立的包。 You will need to install the Subversion package seperately (preferably from your respective package manager).您将需要单独安装 Subversion package(最好从您各自的 package 管理器安装)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM