schematool: command not found

5.2k Views Asked by At

I am trying to install Hive on my Ubuntu 19.10 machine . I am using this doc https://phoenixnap.com/kb/install-hive-on-ubuntu. As mentioned in step 6, where I am trying to initiate Derby Database, I write the command in the right path : ~/apache-hive-3.1.2-bin/bin

schematool –initSchema –dbType derby

But I get this error :

schematool: command not found.

How can I resolve this please ?

4

There are 4 best solutions below

0
On

Try this

using this command I resolved this issue

hive --service schematool -dbType mysql -password hive -username hive -validate

0
On

run ./schematool –initSchema –dbType derby don't forget the ./

0
On

Default path for schematool is $HIVE_HOME/bin/schematool (/apache-hive-3.1.2-bin/bin/schematool in your case). Try to add this HIVE_HOME on your .bashrc file, worked for me.

    # Hive
    export HIVE_HOME=/<your hive path>
    export PATH=$PATH:$HIVE_HOME/bin
0
On

I had the same question before. Maybe because of the wrong configuration files, like hive-site.xml, hive-env.sh. A blank space in my configuration file caused this error.