Ad Widget

Collapse

Installing MySQL ODBC Driver, Ubuntu

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dimenty
    Junior Member
    • Apr 2015
    • 18

    #1

    Installing MySQL ODBC Driver, Ubuntu

    I need to create item that monitors my database using sql query. The item is created but it doesn't work - no values in database. I think its because i haven't ODBC driver.
    So I have problem with installing ODBC Driver for MySQL on my Ubuntu 13.10 x86_64 server. I downloaded ODBC driver from mysql.com (debian linux) then i tryed to install it using this instruction.
    On step 3 i have this message: "myodbc-installer: error while loading shared libraries: libodbcinst.so.2: cannot open shared object file: No such file or directory." What am i doing wrong?
  • Colttt
    Senior Member
    Zabbix Certified Specialist
    • Mar 2009
    • 878

    #2
    you need to install the libaries!

    Code:
    apt-file search libodbcinst.so.2
    odbcinst1debian2: /usr/lib/x86_64-linux-gnu/libodbcinst.so.2
    odbcinst1debian2: /usr/lib/x86_64-linux-gnu/libodbcinst.so.2.0.0
    but why you dont install unixodbc and libmyodbc like:
    Code:
    apt-get install unixodbc libmyodbc
    its easier
    Last edited by Colttt; 16-06-2015, 10:02.
    Debian-User

    Sorry for my bad english

    Comment

    • Dimenty
      Junior Member
      • Apr 2015
      • 18

      #3
      I downloaded unixodbc from http://www.unixodbc.org/ , then run
      Code:
      ./configure 
      make 
      make install
      but I still get this problem.

      Comment

      • Dimenty
        Junior Member
        • Apr 2015
        • 18

        #4
        Also I can't install these packages via apt-get.
        Code:
        root@server:~# apt-get install unixodbc libmyodbc
        Reading package lists... Done
        Building dependency tree
        Reading state information... Done
        The following extra packages will be installed:
          odbcinst odbcinst1debian2
        The following NEW packages will be installed:
          libmyodbc odbcinst odbcinst1debian2 unixodbc
        0 upgraded, 4 newly installed, 0 to remove and 98 not upgraded.
        Need to get 88.6 kB/205 kB of archives.
        After this operation, 801 kB of additional disk space will be used.
        Do you want to continue [Y/n]? y
        WARNING: The following packages cannot be authenticated!
          odbcinst odbcinst1debian2 libmyodbc unixodbc
        Install these packages without verification [y/N]? y
        Err http://us.archive.ubuntu.com/ubuntu/ saucy/main odbcinst amd64 2.2.14p2-5ubuntu4
          404  Not Found [IP: 91.189.91.23 80]
        Err http://us.archive.ubuntu.com/ubuntu/ saucy/main odbcinst1debian2 amd64 2.2.14p2-5ubuntu4
          404  Not Found [IP: 91.189.91.23 80]
        Err http://us.archive.ubuntu.com/ubuntu/ saucy/main unixodbc amd64 2.2.14p2-5ubuntu4
          404  Not Found [IP: 91.189.91.23 80]
        Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/u/unixodbc/odbcinst_2.2.14p2-5ubuntu4_amd64.deb  404  Not Found [IP: 91.189.91.23 80]
        Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/u/unixodbc/odbcinst1debian2_2.2.14p2-5ubuntu4_amd64.deb  404  Not Found [IP: 91.189.91.23 80]
        Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/u/unixodbc/unixodbc_2.2.14p2-5ubuntu4_amd64.deb  404  Not Found [IP: 91.189.91.23 80]
        E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
        I executed apt-get update, and then tryed to run it with --fix-missing but still can't install packages:
        Code:
        root@server:~# apt-get install unixodbc --fix-missing
        ...
        Unable to correct missing packages.
        E: Aborting install.

        Comment

        • Colttt
          Senior Member
          Zabbix Certified Specialist
          • Mar 2009
          • 878

          #5
          sorry but, did you read the errormessages?

          Failed to fetch http://us.archive.ubuntu.com/ubuntu/...ntu4_amd64.deb 404 Not Found [IP: 91.189.91.23 80]
          they cant connect to ubuntu.com! check you sources.list and also you internet connection!
          Debian-User

          Sorry for my bad english

          Comment

          • Dimenty
            Junior Member
            • Apr 2015
            • 18

            #6
            Idk, maybe something was wrong with my inet connection, but anyway there is another problem...
            Code:
            root@server:~# apt-get install unixodbc libmyodbc
            Reading package lists... Done
            Building dependency tree
            Reading state information... Done
            You might want to run 'apt-get -f install' to correct these:
            The following packages have unmet dependencies:
             libmyodbc : Depends: odbcinst1debian2 (>= 2.2.14p2) but it is not going to be installed
             libperl5.14 : Depends: perl-base (= 5.14.2-6ubuntu2.4) but 5.14.2-21build1 is to be installed
             libsnmp15 : Depends: libsnmp-base (>= 5.4.3~dfsg-2.4ubuntu1.2) but 5.4.3~dfsg-2.4ubuntu1.1 is to be installed
             unixodbc : Depends: odbcinst1debian2 (>= 2.2.11-3) but it is not going to be installed
            E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
            I run apt-get -f install

            Code:
            root@server:~# apt-get -f install
            Reading package lists... Done
            Building dependency tree
            Reading state information... Done
            Correcting dependencies... Done
            The following extra packages will be installed:
              libperl5.14 libsnmp-perl libsnmp30 snmp snmpd
            The following packages will be REMOVED:
              libsnmp15 zabbix-server-mysql
            The following NEW packages will be installed:
              libsnmp30
            The following packages will be upgraded:
              libperl5.14 libsnmp-perl snmp snmpd
            4 upgraded, 1 newly installed, 2 to remove and 96 not upgraded.
            Need to get 1,736 kB of archives.
            After this operation, 7,627 kB disk space will be freed.
            Do you want to continue [Y/n]? n
            Abort.
            This command will remove some packages and install their new versions, but what about zabbix-server-mysql package? I'm not sure that removing of this package will be safe.
            Also some weeks ago i wanted to install phpsnmp package on the same server and it wanted to remove this zabbix-server-mysql package again! Tell me please is removing of this package will be harmless for my zabbix server?

            Comment

            • Colttt
              Senior Member
              Zabbix Certified Specialist
              • Mar 2009
              • 878

              #7
              it depends on how do you install zabbix, per apt-get or do you install it by compile you own?

              did you run an 'apt-get update' before?

              it looks like a broken apt database or some strange things in you sources.list

              can you please post the output from this command:
              Code:
              lsb_release -a; cat /etc/apt/sources.list; ls /etc/apt/sources.list.d/; cat /etc/apt/sources.list.d/*
              Debian-User

              Sorry for my bad english

              Comment

              • Dimenty
                Junior Member
                • Apr 2015
                • 18

                #8
                result of lsb_release -a; cat /etc/apt/sources.list; ls /etc/apt/sources.list.d/; cat /etc/apt/sources.list.d/* is in output.txt
                result of apt-get update is in apt-get_update.txt


                ---
                wtf with this forum? I can't copy-paste large text.
                Attached Files

                Comment

                • Colttt
                  Senior Member
                  Zabbix Certified Specialist
                  • Mar 2009
                  • 878

                  #9
                  why you dont use a LTS version from Ubuntu?

                  you have Ubuntu 13.10 Codename saucy, but in you /etc/apt/sources.list.d/zabbix.list you use precise (12.04LTS) and this doesnt work!!

                  you 'apt-get update' output looks not complete!

                  i think the best is you delete the installation, run a fresh installed Ubuntu LTS or Debian Stable and install zabbix..

                  you also see that not all packages cant be downloaded because Ubuntu 13.10 hat EOL in July 2014 (!!!)

                  please use ONLY this as sources.list:
                  Code:
                  deb http://old-releases.ubuntu.com/ubuntu/ saucy main restricted universe multiverse
                  deb http://old-releases.ubuntu.com/ubuntu/ saucy-updates main restricted universe multiverse
                  deb http://old-releases.ubuntu.com/ubuntu/ saucy-security main restricted universe multiverse
                  and then run apt-get update; apt-get upgrade to run you system on the latest stand
                  Last edited by Colttt; 17-06-2015, 11:27.
                  Debian-User

                  Sorry for my bad english

                  Comment

                  • Dimenty
                    Junior Member
                    • Apr 2015
                    • 18

                    #10
                    Zabbix was installed not by me on this server, maybe there were some mistakes during installation. And unfortunatily i don't have reserve server to install new instance of zabbix on it.

                    I changed my sources.list but still can't install anything.

                    Code:
                    root@server:~# cat /etc/apt/sources.list
                    deb http://old-releases.ubuntu.com/ubuntu/ saucy main restricted universe multiverse
                    deb http://old-releases.ubuntu.com/ubuntu/ saucy-updates main restricted universe multiverse
                    deb http://old-releases.ubuntu.com/ubuntu/ saucy-security main restricted universe multiverse
                    root@server:~# apt-get install unixodbc libmyodbc
                    Reading package lists... Done
                    Building dependency tree
                    Reading state information... Done
                    Package unixodbc is not available, but is referred to by another package.
                    This may mean that the package is missing, has been obsoleted, or
                    is only available from another source
                    However the following packages replace it:
                      libodbc1
                    
                    Package libmyodbc is not available, but is referred to by another package.
                    This may mean that the package is missing, has been obsoleted, or
                    is only available from another source
                    
                    E: Package 'unixodbc' has no installation candidate
                    E: Package 'libmyodbc' has no installation candidate
                    root@server:~#

                    Comment

                    • Colttt
                      Senior Member
                      Zabbix Certified Specialist
                      • Mar 2009
                      • 878

                      #11
                      do you run apt-get update ?
                      Debian-User

                      Sorry for my bad english

                      Comment

                      • Dimenty
                        Junior Member
                        • Apr 2015
                        • 18

                        #12
                        Yes, but anyway i can't install it.

                        Attaching outputs of these commands:
                        cat /etc/apt/sources.list
                        apt-get update
                        apt-get install unixodbc
                        apt-get -f install
                        Attached Files

                        Comment

                        • Colttt
                          Senior Member
                          Zabbix Certified Specialist
                          • Mar 2009
                          • 878

                          #13
                          ok, you system is broken you run in different broken dependencies, because you/you parent did some mistakes with apt. (mixed Versions).. its not easy to fix that, so install a new one..
                          Debian-User

                          Sorry for my bad english

                          Comment

                          Working...