UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to install Libre-Office-5.2.4 from source on ubuntu, and getting issue for Python. for this I have installed Python using source-code in /opt/Python3.6 directory, here is the outcome of /opt/Python3.6
Code:
$ ls -l /opt/Python3.6/
total 16
drwxr-xr-x 2 root root 4096 Dec 26 16:45 bin
drwxr-xr-x 3 root root 4096 Dec 26 16:24 include
drwxr-xr-x 4 root root 4096 Dec 26 16:45 lib
drwxr-xr-x 3 root root 4096 Dec 26 16:45 share
when i try to configure office for installation it fail to find Python.
Code:
libreoffice-5.2.4.2$ ./configure --with-python=/opt/Python3.6/
....
....
....
checking for a Python interpreter with version >= 2.6... python
checking for python... /usr/bin/python
checking for python version... 3.6
checking for python platform... linux
checking for python script directory... ${prefix}/lib/python3.6/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python3.6/site-packages
checking which Python to use for Pyuno... checking for a Python interpreter with version >= 3.3... python
checking for python... /usr/bin/python
checking for python version... 3.6
checking for python platform... linux
checking for python script directory... ${prefix}/lib/python3.6/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python3.6/site-packages
system
checking Python.h usability... no
checking Python.h presence... no
checking for Python.h... no
configure: error: Python headers not found. You probably want to set both the PYTHON_CFLAGS and PYTHON_LIBS environment variables
for the above error i have already set the env variables
checking for python script directory... ${prefix}/lib/python3.6/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python3.6/site-packages
I guess setting variables don't cut her. Have a look at the top part of the libreoffice configure script see if you can set (change) the desired directories there.
Something that worked well for me in the past, when I needed to inject all necessary files in their proper place for booting up with the necessary proprietary graphics drivers enabled (Nvidia,AMD) if a supported chip was detected during early bootup on a Debian live system. I would do a mock install of Nvidia to see what would get installed, downloaded the packages and had a look inside to see what all files it had and where they would go.
I had placed the files in /root and had my own compliant boot script that pumped the files in place at the right time and the OS would automatically have proprietary video support for either make of card automatically.
Maybe try this with your package manager and see if you can place the necessary files from your build in the directories other applications would look for them, might save you a lot of headaches in the long run.
I'd highly recommend rolling custom packages for both Python and LibreOffice. That will save a lot of trouble, such as some of what you are encountering already. Mixing and matching manually installed packages almost never works out well, and will always be a lot of effort. You can get the source packages for both python and libreoffice using apt-get:
Code:
mkdir /tmp/scratch/ && cd /tmp/scratch/
apt-get source libreoffice python
From there you'd substitute in the new source code. There's obviously more to it than just that, but you can find many tutorials and guides on the topic for Ubuntu or Debian. Both apply, at least until snappy is fully deployed in Ubuntu. Which version of Ubuntu?
I am trying to install Libre-Office-5.2.4 from source on ubuntu, and getting issue for Python. for this I have installed Python using source-code in /opt/Python3.6 directory, here is the outcome of /opt/Python3.6
Code:
$ ls -l /opt/Python3.6/
total 16
drwxr-xr-x 2 root root 4096 Dec 26 16:45 bin
drwxr-xr-x 3 root root 4096 Dec 26 16:24 include
drwxr-xr-x 4 root root 4096 Dec 26 16:45 lib
drwxr-xr-x 3 root root 4096 Dec 26 16:45 share
when i try to configure office for installation it fail to find Python.
Code:
libreoffice-5.2.4.2$ ./configure --with-python=/opt/Python3.6/
....
....
....
checking for a Python interpreter with version >= 2.6... python
checking for python... /usr/bin/python
checking for python version... 3.6
checking for python platform... linux
checking for python script directory... ${prefix}/lib/python3.6/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python3.6/site-packages
checking which Python to use for Pyuno... checking for a Python interpreter with version >= 3.3... python
checking for python... /usr/bin/python
checking for python version... 3.6
checking for python platform... linux
checking for python script directory... ${prefix}/lib/python3.6/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python3.6/site-packages
system
checking Python.h usability... no
checking Python.h presence... no
checking for Python.h... no
configure: error: Python headers not found. You probably want to set both the PYTHON_CFLAGS and PYTHON_LIBS environment variables
What is in your /opt/Python3.6/include/ directory? It's possible that you may need to do this
i have moved the liberoffice to parent-directory... and this solved the issue...of ./configure but now when i do compilation it fails with new error message.
/opt/libreoffice-5.2.4.2$ make
======================================================================
ERROR: test_ssl_import (testssl.SSLTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/libreoffice-5.2.4.2/pyuno/qa/pytests/testssl.py", line 7, in test_ssl_import
import ssl
File "/opt/Python3.6/lib/python3.6/ssl.py", line 101, in <module>
import _ssl # if we can't import it, let the error propagate
ModuleNotFoundError: No module named '_ssl'
----------------------------------------------------------------------
Ran 1 test in 0.003s
FAILED (errors=1)
You need gdb in your path to show backtraces
Error: a unit test failed, please do one of:
make PythonTest_pyuno_pytests_ssl CPPUNITTRACE="gdb --args"
# for interactive debugging on Linux
make PythonTest_pyuno_pytests_ssl VALGRIND=memcheck
# for memory checking
make PythonTest_pyuno_pytests_ssl DEBUGCPPUNIT=TRUE
# for exception catching
/opt/libreoffice-5.2.4.2/solenv/gbuild/PythonTest.mk:35: recipe for target '/opt/libreoffice-5.2.4.2/workdir/PythonTest/pyuno_pytests_ssl/done' failed
make[1]: *** [/opt/libreoffice-5.2.4.2/workdir/PythonTest/pyuno_pytests_ssl/done] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:256: recipe for target 'build' failed
make: *** [build] Error 2 /opt/libreoffice-5.2.4.2$
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.