Home Php C# Sql C C++ Javascript Python Java Go Android Git Linux Asp.net Django .net Node.js Ios Xcode Cocoa Iphone Mysql Tomcat Mongodb Bash Objective-c Scala Visual-studio Apache Elasticsearch Jar Eclipse Jquery Ruby-on-rails Ruby Rubygems Android-studio Spring Lua Sqlite Emacs Ubuntu Perl Docker Swift Amazon-web-services Svn Html Ajax Xml Java-ee Maven Intellij-idea Rvm Macos Unix Css Ipad Postgresql Css3 Json Windows-server Vue.js Typescript Oracle Hibernate Internet-explorer Github Tensorflow Laravel Symfony Redis Html5 Google-app-engine Nginx Firefox Sqlalchemy Lucene Erlang Flask Vim Solr Webview Facebook Zend-framework Virtualenv Nosql Ide Twitter Safari Flutter Bundle Phonegap Centos Sphinx Actionscript Tornado Register | Login | Edit Tags | New Questions | 繁体 | 简体


10 questions online user: 41

0
votes
answers
62 views
+10

Ganglia中的python gmond_python_modules導入錯誤

0

我用gmond_python_modules,試圖監視一個集羣有幾個主機,每個主機有8個GPU。Ganglia中的python gmond_python_modules導入錯誤

而最後的步驟後,我想我的網絡節點上重新啓動的gmond服務,只得到:

Starting GANGLIA gmond: Could not find platform independent libraries <prefix> 
Could not find platform dependent libraries <exec_prefix> 
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] 
ImportError: No module named site 
                  [FAILED] 

我搜索,最初以爲是因爲我編譯無神經節選項--with-python。但事實並非如此。我重新編譯這個選項(檢查配置輸出,它找到它發現python),一切正常,直到我加入GPU監控python模塊。同樣的錯誤再次。

而且我也嘗試手動分配PYTHONHOMEPYTHONPATH,這沒有什麼區別。我安裝了anaconda。是否可能導致Ganglia找不到正確的載入路徑?

歡迎任何想法。並會在需要時提供更多細節。

分佈和版本的詳細信息:
系統:CentOS的6.8
的Python:2.7的網絡節點上,2.6計算節點
神經節:3.7.2
gmond_python_modules:克隆形式Github的今天

沙发
0
0

this post。這裏的原因是python-devel未安裝在計算節點中,導致缺少'python.h'。所以ganglia配置腳本無法檢測到python支持。

72
votes
answers
51 views
+10

Login disallowed for security reasons postgresql centos server

I am configuring my centos server. I installed postgresql and phppgadmin

When i try accessing phppgadmin as my_server_ip/phpPgAdmin

It redirects to login page and when i try to login getting error as

Login disallowed for security reasons

I even change extra_login_security to false and restarted using following commands

/etc/init.d/httpd restart

and

service postgresql-9.2 restart

Can anyone help me.

沙发
+690
<P> 1)。打開 - &gt; / etc / phppgadmin - &gt; config.inc.php </ p> <p> 2)。將<code> $ conf ['extra_login_security'] = true; </ code>更改為<code> $ conf ['extra_login_security'] = false; </ code> </ p> <blockquote> <p> //如果有額外的話登錄安全性為true,然後通過phpPgAdmin登錄,沒有//密碼或某些用戶名(pgsql,postgres,root,administrator)//將被拒絕。只有在閱讀完FAQ後才設置為false,並且//了解如何更改PostgreSQL的pg_hba.conf以啟用//密碼本地連接。</ p> </ blockquote>

修復了postgres和phppgadmin與windows上的wamp。 - Craig van Tonder於2014年12月13日12:07

很高興保存我的一天,謝謝你 - raduken 2015年8月28日13:31

為什麼人們希望在安裝後無法立即登錄到phppgadmin?似乎反直覺? - Ruraj 2015年11月19日4:30

板凳
+30
<p>我有同樣的問題 - 也在CentOS上 - 並且沒有運氣將安全設置更改為false。</ p> <p>事實證明它沒有使用我們預期的配置文件。</ p> <hr> <p>它正在使用:/usr/share/phpPgAdmin/conf/config.inc.php </ p> <p>而不是:/etc/phpPgAdmin/config.inc.php</p > <hr> <p>即使RPM(phpPgAdmin-5.1-1.rhel6.noarch)安裝了它們...... </ p> <p>我真的不明白為什麼它有兩個,除非有一個覆蓋在某處定義...但我沒有時間去研究它。我確定你沒有理由不能用/ symlink(或硬鏈接)替換/ etc中的那個,儘管如果你試圖卸載RPM會導致問題。但我不會' 除非你熱衷於把它放在/ etc中,以防萬一。我確定他們不包括其中兩個只是為了好玩;)</ p> <p>我知道這可能為時已晚,無法幫助你,但我今天遇到的這個事實意味著它可能會被用來<em>某人</ em>:)</ p>
地板
0

你需要重啟postgresql

systemctl restart postgresql

systemctl restart apache2

0
votes
answers
48 views
+10

Execute PHP script in cron job

In our centos6 server. I would like to execute a php script in cron job as apache user but unfortunately it does not work.

here is the edition of crontab (crontab -uapache -e)

24 17 * * * php /opt/test.php

and here is the source code of "test.php" file which works fine with "apache" user as owner.

<?php exec( 'touch /opt/test/test.txt');?>

I try to replace php with full path of php (/usr/local/php/bin/php) but also it doesn't work

Thanks in advance, Please Help me

0
votes
answers
59 views
+10

Composer-1.5.5不能在CentOS-7.4上使用php-7.2

1

我在CentOS-7.4上安裝了PHP 7.2.0 (cli) (built: Dec 18 2017 09:57:10) (NTS),並且還安裝了composer-1.5.5Composer-1.5.5不能在CentOS-7.4上使用php-7.2

當運行在終端composer,它拋出以下錯誤:

[SymfonyComponentConsoleExceptionCommandNotFoundException] Command "list" is not defined. Did you mean this? list

我怎樣才能解決這個問題?謝謝。

+0

我將'php'版本更改爲'php-7-1-12',現在'composer-1.5.5'沒有問題。我認爲這個問題與'php-7.2'有關。 – ako

+0

你試過最新的版本嗎? 1.5.6。如果這也行不通,你最好的辦法是在這裏發佈一個問題:https://github.com/composer/composer/issues恐怕我們真的不能幫你這個.. – walther

+0

@walther否我沒有嘗試,因爲我說,我改變了PHP的版本和問題解決。當我在生產服務器上工作時,我無法再將php的版本更改爲'7.2',並用'composer-1.5.6'進行測試。謝謝你的回覆。 – ako

沙发
0
1

第一步總是要用最新的版本進行測試,所以對於剛剛發佈的作曲家1.5.6來說。

您可以隨時在本地嘗試,無需爲此使用生產服務器。如果你的本地實驗告訴你它適用於php 7.2 + composer 1.5.5,你會知道你的服務器上有些東西不可用,你可以從那裏開始工作。如果它與作曲家1.5.6一起工作,你會知道它可以在生產服務器上工作,並且你不必擔心會破壞某些東西。

這實際上只是一種標準的做事方式,因爲您不應該使用生產服務器來測試您使用的任何軟件的更新版本的兼容性。

如果PHP 7.2不適用於任何作曲家版本,那麼您應該在這裏爲作曲家創建一個問題:https://github.com/composer/composer/issues,因爲這可能與最新的PHP版本存在一些兼容性問題,我們無法幫助您。

+0

在'Windows-10'機器上,我有'PHP 7.2.0(cli)(built:2017年11月28日23:48:49)(ZTS MSVC15(Visual C++ 2017)x64)''用'composer-1.5.5 '一切正常。本地我將作曲家更新爲'composer-1.5.6',並且它也可以使用'php-7.2'。在服務器上,問題可能出在'CentOs'上。 – ako

+0

你能發佈你試圖使用的命令並將它附加到你的問題嗎?也許這將幫助我們確定什麼是錯的。 – walther

+0

命令是什麼?執行作曲家?我在我的問題中說過,在終端上運行'composer'時出現錯誤。 – ako

0
votes
answers
51 views
+10

Meteor: unexpected mongo exit code 100

I have just installed Meteor version 0.5.9 (45fef52095) to my CentOS release 6.3 (Final) server (Linux version 2.6.32-279.19.1.el6.i686 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Wed Dec 19 04:30:58 UTC 2012)

I have a samba share to a Windows SBS server mounted as /mnt/apshared under the apache user. I have created a directory inside this called 'webmeteor'. I have created an app called 'myapp' inside the 'webmeteor' directory, so my directory is like so: /mnt/apshared/webmeteor/myapp.

I am logged in as root. When I try to run the app using the meteor command, I am given the following error messages:

Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Can't start mongod

MongoDB had an unspecified uncaught exception.
Check to make sure that MongoDB is able to write to its database directory.

My first point of call was this StackOverflow question: Creating a new meteor.js file and get error 100, MongoDB not able to write -- however, following these suggestions (sudo'ing the meteor command, and checking for disk space of which I have 70GB free) has not worked. I am quite certain that these issues are permission related.

I have tried to chown recursively to root:root (as I am logged in as root), and chmod to 777 recursively also, but to no avail.

I am asking you, what should I try next, to allow my Meteor app to start?

Thanks in advance.

0
votes
answers
45 views
+10

如何停止以特定數字創建文件?

0

我想用3個字母的名字創建900個文件。如何停止以特定數字創建文件?

示例:xyz.txt,其中xy,和z是不同的字母從az

我試圖做這樣的事情:

for ((i=1; i < 900; i++)) 
     do touch {a..z}{a..z}{a..z}$i.txt 
done 

我希望它停止在900

但最後我創建的文件超過10K。有人可以幫我完成這個嗎?

+0

你希望這種語法('{a..z} {a..z} {a..z} $ i.txt')能做什麼? –

+0

我期望它創建XXX.txt文件並停在900. – gumluvinisgoodluvin

+0

26 * 26 * 26是17,576;你實際上想創造哪些人的5%? – chepner

沙发
0
2

爲了避免與前一段重複的字符,如在評論中提到任何人的名字,你可以這樣做:

printf '%s.txt
' {a..z}{a..z}{a..z} | grep -vE '(.).?1.?.'  
    | head -n 900 | xargs touch 
  • printf語句打印從aaa.txt列表,aab.txtzzz.txt
  • grep -vE '(.).?1.?.'篩選期間之前的三個字符不是唯一的任何名稱:aaa.txtaab.txtaba.txtbaa.txt都被過濾。
  • head -n 900從列表touch的幾次獲得的第900名
  • xargs touch調用盡可能但將確保在命令行中從未太長。

如果你想隨機的文件名(但仍堅持這些標準),則可以選擇900之前洗牌他們:

printf '%s.txt
' {a..z}{a..z}{a..z} | grep -vE '(.).?1.?.'  
    | shuf | head -n 900 | xargs touch 
+1

'printf'%s n'{a..i} {j..q} {r..z} {r..z} {j..q} {a..d}'給我936個字符串這些都明顯符合要求。 – tripleee

+0

@tripleee你應該把它作爲答案,它非常優雅。 –

板凳
0
0

你可以用2線做到這一點:

all=({a..z}{a..z}{a..z}.txt) 
touch "${all[@]:0:900}" 

(假設你的操作系統允許與900個參數的命令行)。如果除了前900個這樣的文件以外,你需要做更復雜的事情。

地板
0
0

的文件名提醒split默認輸出命名。所以你可以將一個空文件分割成900個文件。

split /dev/null -n900 -a3 --additional-suffix=".txt" "" 
4楼
0
0

下產生910名,並將它們傳遞給touch之前丟棄過去的10。

printf '%s.txt
' {a..m}{p..v}{0..9} | head -n 900 | xargs touch 

你也許能夠找到產生正是900的替代品,所以你可以只touch <pattern>和有殼擴大到所需數量的唯一名稱的組合。

+0

沒有任何數字在名稱中出現兩次的所有數字將生成738個唯一名稱,但包含一些單位和雙位數字。如果您需要三位數字,則有648個組合。 – tripleee

254
votes
answers
35 views
+10

centos: Another MySQL daemon already running with the same unix socket

I have a strange error when starting mysqld service:

Another MySQL daemon already running with the same unix socket.

I've tried to list running services and stopping them but the same error happens when starting mysqld service.

I can try to remove the mysqld and reinstall it but will this remove the database too?

up vote 225 down vote accepted favorite
沙发
+2250
+50

To prevent the problem from occurring, you must perform a graceful shutdown of the server from the command line rather than powering off the server.

# shutdown -h now

This will stop the running services before powering down the machine.

Based on Centos, an additional method for getting it back up again when you run into this problem is to move mysql.sock:

# mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak

# service mysqld start

Restarting the service creates a new entry called mqsql.sock

上面的第二條建議對我有用。一定是因為我沒有優雅地關閉服務器。執行#reboot並沒有解決問題。從未嘗試過關機-h now - fred於2014年1月3日20:54

“shutdown -h now”和boot並沒有為我解決,但“CentOS”選項就像一個魅力。 - PJ Brunet 2014年1月8日12:18

執行#mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak然後#shutdown -h now,它應該可以正常運行。 - Michael Stramel 2014年1月10日6:41

移動襪子對我來說很完美,謝謝。 - Abu Nooh 2014年1月14日2:13

移動襪子文件也適合我。我遇到的最大問題是這是怎麼發生的。我以前從未見過這個問題。 - sstringer 2014年2月4日15:00

+180

TL;DR:

Run this as root and you'll be all set:

rm $(grep socket /etc/my.cnf | cut -d= -f2)  && service mysqld start

Longer version:

You can find the location of MySQL's socket file by manually poking around in /etc/my.conf, or just by using

grep socket /etc/my.cnf | cut -d= -f2

It is likely to be /var/lib/mysql/mysql.sock. Then (as root, of course, or with sudo prepended) remove that file:

rm /var/lib/mysql/mysql.sock

Then start the MySQL daemon:

service mysqld start

Removing mysqld will not address the problem at all. The problem is that CentOS & RedHat do not clean up the sock file after a crash, so you have to do it yourself. Avoiding powering off your system is (of course) also advised, but sometimes you can't avoid it, so this procedure will solve the problem.

cut -d = -f2位可能看起來不對,因為您希望在=符號後面出現一個值,但=是傳遞給-d選項的值:換句話說,=用作分隔符切。 - iconoclast 2014年7月17日13:40

如果您使用的是Ubuntu,請嘗試使用/etc/mysql/my.cnf替換/etc/my.cnf。 - iconoclast 2014年7月17日13:41

我建議greping更具體的東西然後任何包含單詞socket的行,至少grep'^ socket [[:space:]] ='/ etc / my.cnf,或者你可能最終刪除你不想要的東西。 - Beli 2015年10月20日10:30

+40

I have found a solution for anyone in this problem change the socket dir to a new location in my.cnf file

socket=/var/lib/mysql/mysql2.sock

and service mysqld start

or the fast way as GeckoSEO answered

# mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak

# service mysqld start

我剛剛刪除了mysql.sock文件,然後重新啟動了該服務。 - Will Morgan 12年7月17日10:09

+30

My solution to this was a left over mysql.sock in the /var/lib/mysql/ directory from a hard shutdown. Mysql thought it was already running when it was not running.

是的你是對的我關閉系統然後出現這個問題,所以你有一個解決方案,當我啟動服務器不顯示此錯誤 - Mas Dec 8 '13 at 3:25

+20

Just open a bug report with your OS vendor asking them to put the socket in /var/run so it automagically gets removed at reboot. It's a bug to keep this socket after an unclean reboot, /var/run is the spot for these kinds of files.

+10

in order to clean automatically .sock file, place these lines in file /etc/init.d/mysqld immediately after "start)" block of code

test -e /var/lib/mysql/mysql.sock
SOCKEXIST=$?

ps cax | grep mysqld_safe
NOPIDMYSQL=$?

echo NOPIDMYSQL $NOPIDMYSQL
echo SOCKEXIST $SOCKEXIST

if [ $NOPIDMYSQL -eq 1 ] && [ $SOCKEXIST -eq 0 ] ; then
    echo "NOT CLEAN"
    rm -f /var/lib/mysql/mysql.sock
    echo "FILE SOCK REMOVED"
else
    echo "CLEAN"
fi

it worked for me. I had to do this because I have not an UPS and often we have power supply failures.

regards.

以上是要走的路,因為它發生在我們的控制之外,電源熄滅,UPS在一段時間後死亡。所以服務器必須恢復。我在mysql 5.7(centos 6)安裝上遇到此問題,但在5.1(centos 5)上沒有。我沒有時間調查第一個問題是什麼,所以我只是要改進這個答案並使用它。test -e $ socketfile if [$?-eq 0]; 然後 - - 17年9月3日在6:21

看起來我花了超過5分鐘來準備pastebin:這裡是pastebin.com/DpiSGrmh - ciuly 17年3月3日在6:27

+10

It may sometime arises when MySQL service does not shut down properly during the OS reboot. The /var/lib/mysql/mysql.sock has been left. This prevents 'mysqld' from starting up.

These steps may help:

1: service mysqld start killall -9 mysqld_safe mysqld service mysqld start

2: rm /var/lib/mysql/mysql.sock service mysqld start

0

To start the MySQL service, you can remove '/var/lib/mysql/mysql.sock' and start the MySQL service again:

Remove the socket file:

[root@server ~]# rm /var/lib/mysql/mysql.sock
rm: remove socket `/var/lib/mysql/mysql.sock'? yes

Start the MySQL service:

[root@server~]# service mysqld start
Starting mysqld:                                           [  OK  ]

It will help you to resolve your problem.

0

It's just happen because of abnormal termination of mysql service. delete or take backup of /var/lib/mysql/mysql.sock file and restart mysql.

Please let me know if in case any issue..

-10

I just went through this issue and none of the suggestions solved my problem. While I was unable to start MySQL on boot and found the same message in the logs ("Another MySQL daemon already running with the same unix socket"), I was able to start the service once I arrived at the console.

In my configuration file, I found the following line: bind-address=xx.x.x.x. I randomly decided to comment it out, and the error on boot disappeared. Because the bind address provides security, in a way, I decided to explore it further. I was using the machine's IP address, rather than the IPv4 loopback address - 127.0.0.1.

In short, by using 127.0.0.1 as the bind-address, I was able to fix this error. I hope this helps those who have this problem, but are unable to resolve it using the answers detailed above.

3
votes
answers
37 views
+10

sphinx on centos 7 cant started because of searchd.pid absent

I installed sphinx-2.2.11 on my CentOS 7

yum install -y postgresql-libs unixODBC wget 
http://sphinxsearch.com/files/sphinx-2.2.11-1.rhel7.x86_64.rpm yum 
install sphinx-2.2.11-1.rhel7.x86_64.rpm

Installation went without any errors and then I created sphinx config and installed php extension (also all without error)

I restart apache (httpd) and I tried to START sphinx service

systemctl start searchd

I got this message

Job for searchd.service failed because a configured resource limit was > exceeded. See "systemctl status searchd.service" and "journalctl -xe" for details.

after launch command - systemctl status searchd.service

May 02 20:28:57 kvmde43-10657.fornex.org systemd[1]: Failed to read PID from file /var/run/sphinx/searchd.pid: Invalid argument May 02 20:28:57 kvmde43-10657.fornex.org systemd[1]: Failed to start SphinxSearch Search Engine.

In fact I havn't "searchd.pid" anywhere at system though installation went good) How should I fix it ?

Thanks in advance

沙发
+30

I have just resolved this issue.

I took a look at sphinx log /var/log/sphinx/searchd.log and noted that some data files under folder /var/log/sphinx/data/ are Permission denied;

I set chown sphinx:sphinx on /var/log/sphinx/data/ folder and It started to work as charm )

Thanks

0
votes
answers
57 views
+10

Odoo11安裝在CentoOS7上

0

我剛剛買了新的VPS服務器安裝CentOS7,並試圖在我的服務器上安裝Odoo11Odoo11安裝在CentoOS7上

因此,我研究了一些文章,並嘗試以下內容。

// Install requirement packages 
[[email protected] ~]# yum update -y 
[[email protected] ~]# yum install epel-release -y 
[[email protected] ~]# yum install fontconfig libpng libX11 libXext libXrender xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi wkhtmltopdf yum-utils -y 

// Install PostgreSQL 
[[email protected] ~]# yum install postgresql-server -y 
[[email protected] ~]# postgresql-setup initdb 
[[email protected] ~]# systemctl enable postgresql 
[[email protected] ~]# systemctl start postgresql 

// Install Odoo 
[[email protected] ~]# yum-config-manager --add-repo=https://nightly.odoo.com/11.0/nightly/rpm/odoo.repo 
[[email protected] ~]# yum install odoo -y 

運行最後一條命令後,出現錯誤。

...

Error: Package: odoo-11.0.post20171110-1.noarch (odoo-nightly) Requires: python3-psutil Error: Package: odoo-11.0.post20171110-1.noarch (odoo-nightly) Requires: python3-requests Error: Package: odoo-11.0.post20171110-1.noarch (odoo-nightly) Requires: python3-greenlet

...

我該如何解決這個問題?

+2

試試這個https://www.odoo.com/fr_FR/forum/aide-1/question/missing-packages-when-installing-v11-on-centos-7-125072 – Zety

+0

謝謝,它對我很有幫助。 – Tornike

沙发
0
1

這是由於python3依賴項丟失問題,雖然我在CentOS上成功安裝了python3。

最後,我重新啓動服務器,它解決了問題。我不確定爲什麼需要重新啓動。

51
votes
answers
43 views
+10

Why does vi behave differently in Ubuntu than in CentOS?

I've been getting more and more comfortable using vi on a daily basis, but one thing that bothers me is that when I use it on Ubuntu it behaves differently than when I use it on CentOS (and probably other places). I actually prefer the way it works in CentOS.

Here are three things that are really bothering me on Ubuntu:

  1. In CentOS insert mode there is a big bold notice at the bottom that I'm in INSERT mode, but in Ubuntu there is no notice so I can never tell which mode I'm in.

  2. In CentOS insert mode I can press the up/down keys and the cursor will move up and down. But when I'm in Ubuntu pressing up and down inserts the letters A and B respectively on new lines.

  3. In CentOS insert mode I can use the backspace key and it will delete the character that is before the cursor, but in Ubuntu I just hear a beep sound and nothing happens. I can press the delete key in command mode, but I'd rather be able to press the backspace key.

Are these differences something that I have to live with or is it an easy fix?

up vote 39 down vote accepted favorite
沙发
+390
+50

在ubuntu中,默認的vim安裝來自包 vim-tiny ,這不是全部。

您可能希望: < pre> apt-get install vim

  apt-get install vim-full   

您的一些其他問題聽起來像退格鍵和其他問題。獲得vim的完整版本後,請嘗試將這些添加到.vimrc:

  set nocompatible set t_kb = ^ H fixdel   

(重要說明: ^ H是一個文字ctrl-H字符,你可以通過在插入模式下按Ctrl-V Ctrl-H獲得它)

謝謝!我安裝了vim-full並修復了所有三個問題! - Adam Plumb 2009年7月2日14:28

+60

之前提供的答案對我不起作用。

我傾向於選擇盡可能將操作系統安裝為庫存並保持配置文件盡可能簡單。為了解決Ubuntu 12.04中的這三個問題,我做了以下幾點:

在“?/ .vimrc”中插入行 -
set nocp
set bs = 2

+40

除了安裝vim-full之外,如果你還沒有hava ?/ .vimrc

  $ cp / usr / share / vim / vimcurrent /vimrc_example.vim~ / .vimrc   

此示例 .vimrc 已經成為最重要的設置,是自定義的良好開端。

+10

當你說VI時,我會假設你的意思是VIM?至少,第二點似乎是VIM /術語組合的控制台/終端問題。下面的頁面提示了一些修復,但沒有一個我可以工作(我使用vim over putty到Ubuntu開發盒)

http://vim.wikia.com/wiki/Fix_broken_arrow_key_navigation_in_insert_mode

使用.vimrc中的以下內容可以覆蓋第3個點

設置backspace = indent,eol,start

+10
<p>我個人喜歡vim tiny及其控件 - 更接近真實的vi。在某些發行版中,你只能得到'vim' - vim-tiny不可用。在這些我發現類似的解決方案 - 基本的 - 從另一個發行版竊取vim-tiny或編譯真正的vi(代碼仍然可用)。</ p> <p>我對vim的一些問題是它的著色 - 其中大部分都可以關閉但不是全部。最大的問題是沒有報告Ctrl-G上的行號對我來說這使得完全vim無法使用 - 我還沒有找到解決這個問題的方法。</ p> <p>如果vim安裝都可以使用這兩個版本,那麼幾乎所有的vim / vi問題都可以解決。如果只安裝了vim-tiny,你總是可以安裝到完整的vim - 但是,由於一些未知的原因如果安裝了完整的vim(Slackware版本),vim-tiny根本不可用。</ p> <p>完整的'vim'應該有一個簡單的開關,可以放到'vim-tiny' vi兼容性開關不這樣做。vim開發人員的這種態度持續了多年 - 他們的目標是有效地實現“市場份額”概念,即接管和指導用戶選擇 - 我沒有留下深刻的印象。</ p>
0

(1)檢查兩者的 showmode 設置是否不同。

(2)不知道這個,我認為這與終端有關比起本身。

(3)也許嘗試使用:map&lt; BS&gt; :normal d

0

在CentOS中,vi是另一個程序的別名,vim,但在最新版本的Ubuntu中,vi僅表示vi,而不是vim。你看到兩個不同的程序,vi和vim之間的區別。

如果你喜歡vim,只需運行vim,而不是vi。這也適用於Ubuntu

0

在我的.vimrc中設置這個對我有用..

  set term = builtin_ansi  
     
			
        

@StéphaneGourichon的答案是真正正確的答案,Matt Pavelle對於可能導致您首先看到問題的答案有一個很好的答案。 - UltraBob 2016年5月27日0:09

0

我有內部使用Debian 7的WDMyCLoud,即使用:

  cp / usr / share / vim /vimcurrent/debian.vim~ / .vimrc    

     
			
        

if you get permission denied (publickey) go to github.com/settings/ssh and add your ssh key there – Lukas Feb 16 '16 at 9:54

我在哪裡可以獲得我的ssh密鑰以便添加它? - urig 2016年9月4日8:55

@urig我提到的頁面(github.com/settings/ssh)有一個生成GPG密鑰的鏈接並將其添加到您的帳戶 - StéphaneGourichon2016年9月4日17:01

@Surya如果哈希不匹配,則表示您正在與之通信的服務器發送了不同的密鑰。如果沒有突出的公開警告,Github可能不會更改密鑰。因此,服務器是冒充github服務器的不同服務器。它可能是邪惡的攻擊者和/或公司代理人。如果發生這種情況,我會拒絕密鑰,中止連接並進行調查。你觀察過這個,還是一個理論問題? - StéphaneGourichon1月1日12:25

我觀察到了,但看起來它是在我辦公室配置的代理。所以我們通知了IT團隊,現在情況正常。感謝澄清:D - 蘇里亞1月2日6:00