Whenever I open the terminal in linux mint 17 I get:

每当我在linux mint 17中打开终端时,我得到:

No command 'Usage' found, did you mean:
 Command 'osage' from package 'graphviz' (main)
Usage: command not found
rvm-installer: command not found
Options: command not found
bash: /home/XXX/.bashrc: line 59: syntax error near unexpected token `newline'
bash: /home/XXX/.bashrc: line 59: `  [[--]version] <version>'

I installed ruby yesterday and reinstalled it (following the website), but that didn't helped.

我昨天安装了ruby并重新安装了它(在网站之后),但这没有帮助。

Added the .bashrc file.

. bashrc文件补充道。

https://www.dropbox.com/s/i4srudgpjo4hok9/.bashrc?dl=0

https://www.dropbox.com/s/i4srudgpjo4hok9/.bashrc?dl=0

And an image for the lines (with 59) regarding ruby.

以及与ruby相关的行(59行)的图像。

2 个解决方案

#1


2

Have a look at your .bashrc file. When your terminal opens normally (as a non-login shell), it uses the configurations specified in the .bashrc file. It appears the content of the .bashrc file has been modified due to you installing ruby. Maybe you edited the file manually? Could you update your question including the contents of the .bashrc file? I will update my answer accordingly when you do.

看看你的。bashrc文件。当您的终端正常打开(作为非登录shell)时,它将使用.bashrc文件中指定的配置。似乎.bashrc文件的内容由于您安装了ruby而被修改。也许你是手动编辑的?你能更新你的问题包括。bashrc文件的内容吗?当你做的时候,我会相应地更新我的答案。

Edit: Instead of taking a screenshot you could have copied the content of the .bashrc file and paste it in the stackoverflow text field. Could you do that? It will show the entire content of the file.

编辑:您可以复制.bashrc文件的内容,并将其粘贴到stackoverflow文本字段中,而不是截图。你能这样做吗?它将显示文件的整个内容。

From what I can see though in the editor image, none of the content in the file should be there. It seems somehow you managed to pipe the output of running the ruby-installer executable without parameters to your .bashrc file, populating it with content which causes it to give those errors.

从编辑器映像中我可以看到,文件中的任何内容都不应该存在。您似乎设法将运行ruby-installer可执行文件的输出不带参数地传输到.bashrc文件中,并将其填充为内容,从而导致它产生这些错误。

I see a possible solution but before I post anything lets see everything in your .bashrc file first.

我看到了一种可能的解决方案,但在发布任何内容之前,让我们先看看您的.bashrc文件中的所有内容。

Solution: To solve, first remove everything between source ~/.rvm/scripts/rvm and export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting. That content is outputed from running the ruby-installer executable on the terminal without arguments. Somehow you got it in your .bashrc, by cut and paste maybe.

解决方案:要解决,首先删除源~/之间的所有东西。区/脚本/区和出口路径= " $路径:$ HOME /。将rvm添加到脚本路径中。在没有参数的情况下,在终端上运行ruby-installer可执行文件会输出该内容。你可以在。bashrc中,通过剪切和粘贴。

Next, you have source ~/.rvm/scripts/rvm twice. Remove one of them. Everything else looks fine otherwise.

接下来,您有源代码~/。区/脚本/ rvm的两倍。删除其中的一个。其他一切看起来都很好。

更多相关文章

  1. Bash脚本删除目录中多个文件名末尾的'x'字符数量?
  2. Bash脚本不删除给定目录中的文件
  3. 文本文件到字符串数组?
  4. 为什么“可执行文件”操作系统是独立的?
  5. 实体机与虚拟机linux文件互拷贝
  6. 如何使用for-each循环在bash中迭代文件路径?
  7. Linux学习总结(十五)文件查找 which whereis locate find
  8. 嵌入式Linux文件系统及其存储机制分析
  9. Oracle表按字段和|分格符导出文件

随机推荐

  1. 当python遇到mysql时,如何顺利安装mysql
  2. 如果没有匹配,则使用默认值执行左连接。
  3. mysql非安装包安装教程
  4. 解决Navicat数据传输问题:The‘InnoDB’f
  5. 如何在codeigniter上的一个提交中插入多
  6. Mysql数据库四大特性、事物的四个隔离、
  7. solr6.3与MySQL结合使用的简明教程(五)——
  8. mysql 判断null 和 空字符串
  9. 通过Bash脚本语言逃避MYSQL命令行。
  10. 如何创建一个新表,该表根据名称获取其他表