Find the answer to your Linux question:
Results 1 to 7 of 7
I am trying to install a SphinxSearch extension .tar file onto a directory on my server. Downloading directly from the browser just puts it into a Windows directory. Is there ...
  1. #1
    Just Joined!
    Join Date
    Jun 2011
    Posts
    9

    How do I download a .tar file from ssh terminal?

    I am trying to install a SphinxSearch extension .tar file onto a directory on my server. Downloading directly from the browser just puts it into a Windows directory.

    Is there a way to move that file into my linux directory or a way to download it straight to my directory to extract it?

    Sorry if this is a obvious question. Pretty new to linux.

  2. #2
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,096
    Code:
    wget <URL>
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Jun 2011
    Posts
    9
    wow thanks...

    The basic steps to install Sphinxsearch is

    tar zxvf libstemmer_c.tgz
    ./configure
    make
    make install

    But when I get to make, it gives me errors :

    Code:
    Making all in src
    make[1]: Entering directory `/srv/www/wiki/extensions/sphinx-0.9.9/src'
    if test -d ../.svn; then svn info .. --xml | perl svnxrev.pl; fi;
    make  all-am
    make[2]: Entering directory `/srv/www/wiki/extensions/sphinx-0.9.9/src'
    g++ -DHAVE_CONFIG_H -I. -I../config  -DSYSCONFDIR="\"/usr/local/etc\"" -I/usr/local/include -Iyes   -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinx.o -MD -MP -MF .deps/sphinx.Tpo -c -o sphinx.o sphinx.cpp
    In file included from sphinx.cpp:14:
    sphinx.h:58:19: error: mysql.h: No such file or directory
    In file included from sphinx.cpp:14:
    sphinx.h:1230: error: ISO C++ forbids declaration of âMYSQL_RESâ with no type
    sphinx.h:1230: error: expected â;â before â*â token
    sphinx.h:1231: error: ISO C++ forbids declaration of âMYSQL_FIELDâ with no type
    sphinx.h:1231: error: expected â;â before â*â token
    sphinx.h:1232: error: âMYSQL_ROWâ does not name a type
    sphinx.h:1233: error: âMYSQLâ does not name a type
    sphinx.cpp: In member function âvirtual void CSphIndex_VLN::DebugDumpDocids(FILE*)â:
    sphinx.cpp:14647: warning: format â%dâ expects type âintâ, but argument 3 has type âlong unsigned intâ
    sphinx.cpp: In constructor âCSphSource_MySQL::CSphSource_MySQL(const char*)â:
    sphinx.cpp:19129: error: class âCSphSource_MySQLâ does not have any field named âm_pMysqlResultâ
    sphinx.cpp:19130: error: class âCSphSource_MySQLâ does not have any field named âm_pMysqlFieldsâ
    sphinx.cpp:19131: error: class âCSphSource_MySQLâ does not have any field named âm_tMysqlRowâ
    sphinx.cpp: In member function âvirtual void CSphSource_MySQL::SqlDismissResult()â:
    sphinx.cpp:19140: error: âm_pMysqlResultâ was not declared in this scope
    sphinx.cpp:19143: error: âm_pMysqlResultâ was not declared in this scope
    sphinx.cpp:19143: error: âmysql_free_resultâ was not declared in this scope
    sphinx.cpp:19145: error: âm_pMysqlFieldsâ was not declared in this scope
    sphinx.cpp: In member function âvirtual bool CSphSource_MySQL::SqlQuery(const char*)â:
    sphinx.cpp:19152: error: âm_tMysqlDriverâ was not declared in this scope
    sphinx.cpp:19152: error: âmysql_queryâ was not declared in this scope
    sphinx.cpp:19155: error: âm_pMysqlResultâ was not declared in this scope
    sphinx.cpp:19155: error: âm_tMysqlDriverâ was not declared in this scope
    sphinx.cpp:19155: error: âmysql_use_resultâ was not declared in this scope
    sphinx.cpp:19156: error: âm_pMysqlFieldsâ was not declared in this scope
    sphinx.cpp: In member function âvirtual bool CSphSource_MySQL::SqlIsError()â:
    sphinx.cpp:19163: error: âm_tMysqlDriverâ was not declared in this scope
    sphinx.cpp:19163: error: âmysql_errnoâ was not declared in this scope
    sphinx.cpp: In member function âvirtual const char* CSphSource_MySQL::SqlError()â:
    sphinx.cpp:19169: error: âm_tMysqlDriverâ was not declared in this scope
    sphinx.cpp:19169: error: âmysql_errorâ was not declared in this scope
    sphinx.cpp: In member function âvirtual bool CSphSource_MySQL::SqlConnect()â:
    sphinx.cpp:19175: error: âm_tMysqlDriverâ was not declared in this scope
    sphinx.cpp:19175: error: âmysql_initâ was not declared in this scope
    sphinx.cpp:19178: error: âmysql_ssl_setâ was not declared in this scope
    sphinx.cpp:19182: error: âmysql_real_connectâ was not declared in this scope
    sphinx.cpp: In member function âvirtual void CSphSource_MySQL::SqlDisconnect()â:
    sphinx.cpp:19188: error: âm_tMysqlDriverâ was not declared in this scope
    sphinx.cpp:19188: error: âmysql_closeâ was not declared in this scope
    sphinx.cpp: In member function âvirtual int CSphSource_MySQL::SqlNumFields()â:
    sphinx.cpp:19194: error: âm_pMysqlResultâ was not declared in this scope
    sphinx.cpp:19197: error: âm_pMysqlResultâ was not declared in this scope
    sphinx.cpp:19197: error: âmysql_num_fieldsâ was not declared in this scope
    sphinx.cpp: In member function âvirtual bool CSphSource_MySQL::SqlFetchRow()â:
    sphinx.cpp:19203: error: âm_pMysqlResultâ was not declared in this scope
    sphinx.cpp:19206: error: âm_tMysqlRowâ was not declared in this scope
    sphinx.cpp:19206: error: âm_pMysqlResultâ was not declared in this scope
    sphinx.cpp:19206: error: âmysql_fetch_rowâ was not declared in this scope
    sphinx.cpp: In member function âvirtual const char* CSphSource_MySQL::SqlColumn(int)â:
    sphinx.cpp:19213: error: âm_pMysqlResultâ was not declared in this scope
    sphinx.cpp:19216: error: âm_tMysqlRowâ was not declared in this scope
    sphinx.cpp: In member function âvirtual const char* CSphSource_MySQL::SqlFieldName(int)â:
    sphinx.cpp:19222: error: âm_pMysqlResultâ was not declared in this scope
    sphinx.cpp:19225: error: âm_pMysqlFieldsâ was not declared in this scope
    sphinx.cpp:19226: error: âm_pMysqlResultâ was not declared in this scope
    sphinx.cpp:19226: error: âmysql_fetch_fieldsâ was not declared in this scope
    sphinx.cpp:19228: error: âm_pMysqlFieldsâ was not declared in this scope
    sphinx.cpp: In member function âvirtual DWORD CSphSource_MySQL::SqlColumnLength(int)â:
    sphinx.cpp:19234: error: âm_pMysqlResultâ was not declared in this scope
    sphinx.cpp:19238: error: âm_pMysqlResultâ was not declared in this scope
    sphinx.cpp:19238: error: âmysql_fetch_lengthsâ was not declared in this scope
    sphinx.cpp: At global scope:
    sphinx.cpp:1741: warning: âg_tmInitTimerâ defined but not used
    make[2]: *** [sphinx.o] Error 1
    make[2]: Leaving directory `/srv/www/wiki/extensions/sphinx-0.9.9/src'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/srv/www/wiki/extensions/sphinx-0.9.9/src'
    make: *** [all-recursive] Error 1

    Does anyone know what is wrong?

  4. #4
    Just Joined!
    Join Date
    Jun 2011
    Posts
    11
    You are compiling this program from source code. It does not use package managment so the configure script you run with ./configure is checking for missing dependencies the program needs. Can you run
    Code:
    make clean
    and then run ./configure again. The post the text generated by configure here.

  5. #5
    Just Joined!
    Join Date
    Jun 2011
    Posts
    9
    I typed make clean and ran

    Code:
     
    
    sudo ./configure --with-mysql-includes
    
    checking build environment
    --------------------------
    
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether to enable maintainer-specific portions of Makefiles... no
    
    checking for compiler programs
    ------------------------------
    
    checking whether to compile debug version... no
    checking for gcc... gcc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables...
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for style of include used by make... GNU
    checking dependency style of gcc... gcc3
    checking for g++... g++
    checking whether we are using the GNU C++ compiler... yes
    checking whether g++ accepts -g... yes
    checking dependency style of g++... gcc3
    checking for ranlib... ranlib
    
    checking for header files
    -------------------------
    
    checking how to run the C preprocessor... gcc -E
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for ANSI C header files... yes
    checking for sys/wait.h that is POSIX.1 compatible... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking fcntl.h usability... yes
    checking fcntl.h presence... yes
    checking for fcntl.h... yes
    checking limits.h usability... yes
    checking limits.h presence... yes
    checking for limits.h... yes
    checking netdb.h usability... yes
    checking netdb.h presence... yes
    checking for netdb.h... yes
    checking netinet/in.h usability... yes
    checking netinet/in.h presence... yes
    checking for netinet/in.h... yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking sys/file.h usability... yes
    checking sys/file.h presence... yes
    checking for sys/file.h... yes
    checking sys/socket.h usability... yes
    checking sys/socket.h presence... yes
    checking for sys/socket.h... yes
    checking sys/time.h usability... yes
    checking sys/time.h presence... yes
    checking for sys/time.h... yes
    checking for unistd.h... (cached) yes
    checking pthread.h usability... yes
    checking pthread.h presence... yes
    checking for pthread.h... yes
    checking expat.h usability... no
    checking expat.h presence... no
    checking for expat.h... no
    checking iconv.h usability... yes
    checking iconv.h presence... yes
    checking for iconv.h... yes
    checking zlib.h usability... no
    checking zlib.h presence... no
    checking for zlib.h... no
    checking sql.h usability... no
    checking sql.h presence... no
    checking for sql.h... no
    
    checking for types
    ------------------
    
    checking for stdbool.h that conforms to C99... yes
    checking for _Bool... yes
    checking for an ANSI C-conforming const... yes
    checking for inline... inline
    checking for off_t... yes
    checking for size_t... yes
    checking whether time.h and sys/time.h may both be included... yes
    
    checking for library functions
    ------------------------------
    
    checking for pid_t... yes
    checking vfork.h usability... no
    checking vfork.h presence... no
    checking for vfork.h... no
    checking for fork... yes
    checking for vfork... yes
    checking for working fork... yes
    checking for working vfork... (cached) yes
    checking for stdlib.h... (cached) yes
    checking for GNU libc compatible malloc... yes
    checking for stdlib.h... (cached) yes
    checking for GNU libc compatible realloc... yes
    checking sys/select.h usability... yes
    checking sys/select.h presence... yes
    checking for sys/select.h... yes
    checking for sys/socket.h... (cached) yes
    checking types of arguments for select... int,fd_set *,struct timeval *
    checking return type of signal handlers... void
    checking whether lstat dereferences a symlink specified with a trailing slash... yes
    checking whether stat accepts an empty string... no
    checking for vprintf... yes
    checking for _doprnt... no
    checking for library containing setsockopt... none required
    checking for library containing gethostbyname... none required
    checking for library containing XML_Parse... no
    checking for library containing iconv... none required
    checking for library containing inflate... no
    checking for library containing logf... -lm
    checking for library containing SQLConnect... no
    checking for dup2... yes
    checking for gethostbyname... yes
    checking for gettimeofday... yes
    checking for memmove... yes
    checking for memset... yes
    checking for select... yes
    checking for socket... yes
    checking for strcasecmp... yes
    checking for strchr... yes
    checking for strerror... yes
    checking for strncasecmp... yes
    checking for strstr... yes
    checking for strtol... yes
    checking for logf... yes
    checking for pread... yes
    checking for clock_gettime in -lrt... yes
    checking for clock_gettime... yes
    checking for LOCK_EX in sys/file.h... yes
    checking for F_SETLKW in fcntl.h... yes
    
    configuring Sphinx
    ------------------
    
    checking for CFLAGS needed for pthreads... none
    checking for LIBS needed for pthreads... -lpthread
    checking for pthreads... found
    checking whether to compile with MySQL support... yes
    checking for mysql_config... not found
    checking MySQL include files... -Iyes
    checking MySQL libraries... -L/usr/lib64/mysql -lmysqlclient -lz
    checking whether to compile with PostgreSQL support... no
    checking whether to use 64-bit document/word IDs... no
    checking whether to compile with libstemmer support... no
    checking for libexpat... not found
    configure: WARNING: xmlpipe2 will NOT be available
    checking for libiconv... not required
    checking for UnixODBC... not found
    configure: WARNING: ODBC source support will NOT be available
    checking for unaligned RAM access... yes
    
    generating configuration files
    ------------------------------
    
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating src/Makefile
    config.status: creating libstemmer_c/Makefile
    config.status: creating sphinx.conf.dist
    config.status: creating sphinx-min.conf.dist
    config.status: creating config/config.h
    config.status: config/config.h is unchanged
    config.status: executing depfiles commands
    
    configuration done
    ------------------
    
    You can now run 'make' to build Sphinx binaries,
    and then run 'make install' to install them.
    i then run "sudo make" and still get the same errors as above...

  6. #6
    Linux Guru
    Join Date
    May 2011
    Posts
    1,838
    This line here in your 'make' output is telling you it is missing MySQL header files:
    Code:
    sphinx.h:58:19: error: mysql.h: No such file or directory
    They are usually packaged for distros in a package called mysql-devel. Install that and see if you get any farther.

  7. #7
    Just Joined!
    Join Date
    Jun 2011
    Posts
    9
    Thanks, that part works now. The search seems to work on the command line...

    To add it to my wiki page, I added the line

    Code:
    require_once( "$IP/extensions/SphinxSearch/SphinxSearch.php" );
    to my localsettings.php


    It's not showing up on the wiki page though
    Last edited by etranman1; 06-13-2011 at 03:39 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...