[英]Build htdig on ubuntu machine
在我的Ubuntu計算機上,安裝了htdig(www.htdig.org)。 例如“哪個htdig”給我,/ usr / bin / htdig
我想在/ var / www / my_web_site下安裝htdig,即/ var / www / my_web_site / htdig
額外信息:
對於htdig-3.1.6:
當我運行“ ./configure”時,我得到:
配置:錯誤:要編譯ht:// Dig,您將需要一個C ++庫。 嘗試安裝libstdc ++
“運行/ sbin / ldconfig -p | grep stdc ++”
我有:
我也嘗試了htdig-3.2.0b6 :
我運行“ ./configure”,看起來很好。 我收到類似“現在必須運行'make',然后運行'make install'”的信息
當我運行“ make”時,出現了很多錯誤,例如:
.....
Making all in htsearch
make[1]: Entering directory '/var/www/test/testme/sounddesign/htdig-3.2.0b6/htsearch'
g++ -DHAVE_CONFIG_H -I. -I. -I../include -DDEFAULT_CONFIG_FILE=\"/opt/www/conf/htdig.conf\" -I../include -I../htlib -I../htnet -I../htcommon -I../htword -I../db -I../db -DCONFIG_DIR=\"/opt/www/conf\" -I../htfuzzy -g -O2 -Wall -fno-rtti -fno-exceptions -c -o Display.o `test -f 'Display.cc' || echo './'`Display.cc
In file included from Display.cc:30:0:
Collection.h:39:10: error: extra qualification ‘Collection::’ on member ‘Open’ [-fpermissive]
void Collection::Open();
....
....
....
Display.cc:830:32: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
if (input->exists("endyear"))
^
知道我該怎么辦嗎?
編譯器抱怨Collection::
中的類前綴Collection::
既不必要,而且現在是非法的。
只需將htsearch / Collection.h標頭更改為此:
class Collection : public Object
{
public:
//
// Construction/Destruction
//
Collection(const char *name, const char *wordFile,
const char *indexFile, const char *docFile,
const char *docExcerpt);
~Collection();
// COMMENT OUT OR REMOVE THESE TWO LINES:
// void Collection::Open();
// void Collection::Close();
// ADD THESE TWO:
void Open();
void Close();
(注釋/刪除舊行,聲明“打開/關閉”,並在上面添加最后兩行)
完成此操作后,htdig 3.2 b 6為我成功編譯。 警告僅僅是:警告。 它們不會阻止成功的編譯。 現在這是一個非常古老的代碼庫,並且某些C ++始終不符合當前的編譯器標准。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.