[GNC] Idiots guide to building GNC 4.9 on Ubuntu 20.04LTS

Jeff beastmaster126 at hotmail.com
Sat Jan 8 02:32:35 EST 2022


On 1/4/22 5:38 AM, davidcousens49 at gmail.com wrote:
> Jeff,
>
> If you are having difficulty Jeff you will have to tell us exactly what you have
> done and which commands you have entered into the terminal and exactly what the
> terminal output is to each command. We are not mind readers and we are not on
> your system so unless you tell us we do not know what is happening, we don't
> know.
>
> We need information to diagnose problems. Even worse a lot of us will not be on
> Ubuntu but on other Linux distributions. There are sometimes subtle and
> sometimes not so subtle differences to Ubuntu. The build instructions do assume
> some general familiarity with building software on Linux and Linux terminal
> operation.
>
> If you go to your Ubuntu menu, you should find a heading called something like
> Administration and it will have an entry with a name like Software Sources. If
> you click on that you will get a dialogue up. It should have a tab on the LH
> side with a name like Official Repositories and if you click on that there
> should be an entry Optional Sources.  If there is a switch, checkbox or other
> control labelled "Software code repositories" or similar make sure it is
> selected/checked etc.
>
>
> I have found for example that the apt -y switch does not work on Linux Mint. I
> am not sure about Ubuntu as Linux Mint uses a modified apt command. David
> Whiting's script was for Ubuntu 20.04 so it should have worked to install the
> dependencies.
>
> One thing you will have to do is find the script file in the file manager and
> check that it is marked for execution. If not the script won't run. You may have
> to alter the file manager options to display the file permissions. They should
> be "-rwxrwxr-x". The "x" in the last position has to be present.
>
> If not, if you open a terminal in the directory containing the copy of the
> script file, then the command
>
> chmod +x <script name>.sh
>
> will mark the script file as executable. Typing
>
> ./<script name>.sh
>
> in the terminal will then execute it
>
> If that does not work then the following will help to establish whether the
> dependencies have been installed. In any of the following substitute for any
> descriptor of the form enclosed in angle brackets e.g. <script name>, the actual
> name for the file on your system. In any output the descriptor will be replaced
> with an appropriate name
>
> Open a terminal and type in the following commands one at a time to check
> whether the dependencies are installed or not.
>
> sudo apt update
> sudo apt upgrade
> sudo apt install git
> sudo apt build-dep gnucash
> sudo apt install libboost-program-options1.71-dev
>
> The first two commands will update and upgrade the apt-cache and upgrade any
> installed packages. The last three lines should have the following lines in
> their output if the dependencies are installed.  If not the commands will
> install them.
>
> "<package name> is is already the newest version (<version number>)
> 0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade."
>
> If not those commands should install the dependencies.
>
>
> try this and come back and report what happens.
>
> David Cousens
>
>
> On Tue, 2022-01-04 at 00:49 -0600, Jeff wrote:
>> On 12/24/21 8:30 AM, david whiting wrote:
>>> On Fri, 24 Dec 2021 at 09:11, Jeff <beastmaster126 at hotmail.com> wrote:
>>>
>>> [...]
>>>> But it appears I am not even a day old computer programmer, after 40
>>>> plus years of coding.  For the life of me I cannot get the 4.9 code and
>>>> tools for Ubuntu to install.  I've followed every link I can find, even
>>>> those that David Cousins provided and I still cannot get the source or
>>>> dependencies to install or download.
>>>>
>>>> Would someone please list for me in baby steps howto download and build
>>>> GNC 4.9 for Ubuntu?
>>>>
>>> Hi Jeff,
>>>
>>> The script below will build version 4.9 on Ubuntu 20.04 LTS. I have
>>> verified this on a clean installation of Ubuntu.
>>> One thing that tripped me up a few times is remembering to tick
>>> "Source Code" in the Software And Updates dialogue. If you don't do
>>> this, it will fail.
>>> Please note that I have used -y with apt install so it will install
>>> and build without asking.
>>>
>>> I will try to get around to putting this in the wiki to make it easier
>>> for people to find.
>>>
>>> === build.sh ===
>>>
>>> ## Ubuntu 20.04
>>> ## In "Software and Updates":
>>> ## Tick "Source code"
>>> ## Tick "Community-maintained free and open-source software (Universe)"
>>>
>>> ## Change this if you want to build it somewhere else.
>>> SOURCEDIR="$HOME/Documents/gnucash/source"
>>> BUILDDIR="$HOME/Documents/gnucash/build"
>>>
>>> ## Change this if you want to install it somewhere else.
>>> INSTALLDIR=/opt/gnucash
>>>
>>> sudo apt -y update
>>> sudo apt -y upgrade
>>> sudo apt -y install git
>>> sudo apt -y build-dep gnucash
>>>
>>> ## To build series 4 of gnucash on Ubuntu 20.04
>>> sudo apt -y install libboost-program-options1.71-dev
>>>
>>> mkdir -p $SOURCEDIR
>>> mkdir -p $BUILDDIR
>>>
>>> ## Clone gnucash source from git
>>> git clone https://github.com/Gnucash/gnucash.git $SOURCEDIR
>>>
>>> ## Checkout version 4.9
>>> cd $SOURCEDIR
>>> git checkout -b 4.9 4.9
>>>
>>> cd $BUILDDIR
>>> cmake -DCMAKE_INSTALL_PREFIX=$INSTALLDIR $SOURCEDIR
>>>
>>> make
>>>
>>> === End of build.sh ===
>>>
>>> Fingers-crossed this will work for you.
>>>
>>>
>>> David
>>>
I just noticed that when I execute:

sudo apt update

I get an series of error messages.

===
Err:1 http://Community-maintained free InRelease
   Temporary failure resolving 'Community-maintained'

<cut, other loads work, at the end it reports end cut>

2 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch http://Community-maintained/dists/free/InRelease  Temporary failure resolving 'Community-maintained'
W: Some index files failed to download. They have been ignored, or old ones used instead.

----
apt list --upgradable reports:

linux-modules-nvidia-440-generic-hwe-20.04/focal-updates,focal-security 5.11.0-44.48~20.04.2+1 amd64 [upgradable from: 5.11.0-38.42~20.04.1]
linux-modules-nvidia-460-generic-hwe-20.04/focal-updates,focal-security 5.11.0-44.48~20.04.2+1 amd64 [upgradable from: 5.11.0-38.42~20.04.1]

I did finally get: "sudo apt -y install libboost-program-options1.71-dev" to work.

Not sure if any of this is related or not to unsuccessful builds.  Side note: your shell runs and completes but; now I'll be flipped if I can find where it puts the executable now. Directory /opt is empty.

-- 
--JEffrey Black M.B.A.



More information about the gnucash-user mailing list