Why does ./configure give me unmet packages, that do not exist?

I’m trying to compile Caribou on Xubuntu 14.04.

In the INSTALL document it says, that I should run ./configure && make && make install.

But the ./configure step ended with:

checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/dist-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/dist-packages
checking for CARIBOU... no
configure: error: Package requirements (
  pygobject-3.0 >= 2.90.3,
  gtk+-3.0      >= 3.0.0,
  clutter-1.0   >= 1.5.11,
  gdk-3.0       >= 3.0.0,
  ) were not met:

No package 'pygobject-3.0' found
No package 'gtk+-3.0' found
No package 'clutter-1.0' found
No package 'gdk-3.0' found
No package 'atspi-2' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables CARIBOU_CFLAGS
and CARIBOU_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

Trying to install any of these packages fails, because they’re not in the package index.

I’ve seen this with some other programs I wanted to compile, so it seems to be a problem with my machine.

Could someone explain to me, what the error is actually saying and what I can do against it?

Breaking dependencies on remote APIs

The system I’m working on has a core web application where the bulk of the work is done. However, it relies on another server to handle transactional finance data. It connects to the server using a REST API. I’m trying to work only on the core web application but I keep hitting pages and function calls that rely on the REST API.

For getting up and running, I was told that the best option is to connect to the VPN and to point the API client to the shared REST API server.

While that’s a reasonable solution for a quick bug fix or QA, I feel that it isn’t very good for the application in general. This massive dependency makes it hard to test and develop but I don’t know how to break it.

What are my options?

Should I be mocking out all the API client calls? Should I be using mocks and patches only when I’m fixing something? Or should I just suck it up and use the VPN and shared REST API server?

Do I need Bower for front end dependencies when I am already using composer?

I use composer for PHP dependencies. I was under the impression that for front end dependencies I should use Bower. So, I installed Bower and loaded my FE dependencies (Bootstrap, jQuery) using that. I then manually symlink to the libraries as follows:

mypc:/var/www/myproject/public/js$ ls -l
total 8
lrwxrwxrwx 1 tom tom   67 Dec 23 07:29 bootstrap.min.js -> /var/www/myproject/bower_components/bootstrap/dist/js/bootstrap.min.js
lrwxrwxrwx 1 tom tom   58 Dec 23 07:29 jquery.min.js -> /var/www/myproject/bower_components/jquery/dist/jquery.min.js

However, I notice that these are stored within a directory /bower_components just as composer dependencies are stored in /vendor. So now I have /bower_components and /vendor as well as /node_modules (for grunt and grunt plugins). So as all Bower does it bring down the repositories, upon which I need to link to them – can I not just use composer for front end libraries too?

"components/jquery": "dev-master"
"components/bootstrap": "dev-master"

.. then create symlinks to the files (e.g. .js .css) in my public/* directories? Is there any reason whhy Bower is still better for managing FE dependencies? Thanks

Is the table in 3NF?

I am creating a relational database – a library management system. I want to show an example where I normalize the data from 2NF to 3NF. My example of 2NF looks like

enter image description here

The definition of third normal form would be:
‘all non-key attributes are not dependent on any other non-key attributes.’

In this instance, the non-key attribute ISBN determines the value of the primary key SKU (stock keeping unit). Does this define a transitive dependency, when SKU is the primary key?

And further, would it be correct to divide the uploaded table into a subtable (Book) with the attributes (isbn, title, author_first_name, author_middle_name, author_last_name) and the subtable (Copy) with the attributes (sku, isbn)?

Is the target of 3 dependencies per class always achievable?

I’m reading the Clean Code book and a chapter says that if a class has more than 3 dependencies is a code smell of that class isn’t doing one thing. Or what is the same, it isn’t following SRP. I’m thinking in certain scenarios in which I am unable to reset the number of dependencies to stick to that number.

Let’s say we have an app that connects to a public API REST what offers varied information about a lot entities in our domain. In our app we detect an use case repeated in many places where we request to the API the info about an entity with other dependent entities that it has.

The API REST doesn’t offer the data in the format we want because the calls when can make are to get data from a single table on the web database, not offers the data agrouped with other tables as we want. So our use case have to make different Api Call’s for to get all different data about the entities we need and then merge in the model we will use in the app.

To connect with the external subsystem we will hide implementation in a single Service class however this class has grown too much resulting a class with a lot methods to get data about all entities of the api rest. So we split this huge class into differents following the Repository pattern. Each class for each possible operations with an entity on the API.

Then, to hide all this concrete and common interaction with the service layer we will use a Facade class to coordinating all this calls. The problem I’m figuring it will have, is that it will have a lot dependencies in her constructor. Will have classes for each repository class and mapper classes to adapt the web data into app data.

The solution in these cases is merge all related dependencies in one so you reduce the number. One example is this: Refactoring to Aggregate Services. http://blog.ploeh.dk/2010/02/02/RefactoringtoAggregateServices/

But you merge when you see a clear relationship. What happend if in your class you can’t see that? All classes are granulated but all of them are necesary to achieve the goal but can’t not be merged in an aggregate service.

So my question is, the “rule” that more than three dependencies violates SRP is always applicable? Returning to our example, our facade needs to access many repository classes and mapper classes. The mapper classes can be hide on a agreggated service, maybe, but repository classes are fine like are. We could introduce a service locator to store them but it is a very bad practice.

If A and B are candidate keys, then AB is candidate key or not ?

If R{abc} is a relation, f{ a->b b->a a->c b->c }, then a and b are candidate keys. What about ab ? Is it a candidate key or is it a super key or both ?

How to model the dependencies between fields in very complex forms

We have to create a web application that will be used as an application form for multiple insurance products (15 in total). This application form will be similar to a form wizard, it will span across multiple pages, depending on what product between 4 and 10.

The grand total of all different elements (inputs, select boxes) that the form will be rendering is around 250, but even the most complex product will not use more than 170 of them. The least complex one still requires around 80 elements.

We do not want to create 15 different application forms, one per product, we want to have a single application form which will be used by all products.

Now as you can imagine, the elements have a lot of dependencies between them. A value entered in a field can make another field or set of field appear or disappear (on the current page or a following page(s)). Some other dependencies based on entered values:

  • value of an element is required or not
  • possible values for select boxes will be changed
  • the validation constraints will be changed

As you can imagine, modeling this is very complex. The question is, what tool would you recommend for modeling (and documenting) all these elements, the dependencies between them and the validation constraints? How would you do the modeling? Not talking about the data model at all in this case. This model will be part of the specifications of what needs to be done and as a reference after the completion of the project. By changing the model the application forms will not be automatically changed.

Some of the things we would like to be able to do easily:

  • see what elements a certain element depends on
  • see all elements included in the form for certain product
  • see required elements for a certain product
  • define validation rules for each element
  • define various attributes for each element

Limitation: our product managers and product owners are the ones who will do the modelling.

How to manage coupling in model classes

I’m doing a class diagram for a game project, but I’m stuck on a coupling problem.


The projet is a turn-based game. Two users are playing. They’ve got units on a map. They play until 1 player has all his units dead or if a predefined number of turns are reached.
At each round, each player will review his units one by one:

  • he can move an unit until the unit hasn’t got any movement point left
  • he can skip the unit’s turn


Class diagram

Classes irrelevant to the questions have been cut

The Game class holds all the relevant objects : the players, the units, the current turn (which player(s) have already played, who’s next, …). The Turn object holds a PlayerTurn object, which keeps tracks of which units have already been played, which units are left to play, …


-> Let’s suppose we’re creating the GetNextPlayableUnit method (in class PlayerTurn).

We’ll have to iterate through the current player’s units and find one that is not in the “PlayedUnits” list. Therefore, we’ll have to call Game.Units.GetUnits with the parameter Game.Turn.CurrentPlayer (Game refers to the current Game’s instance).

-> Let’s suppose we’re creating the MoveTo method (in class Unit).

If the Unit hasn’t got any movement point left, we’ll have to call Game.Turn.PlayerTurn.Finish which will either select the next playable unit or finish the current player’s turn if he already played all of his units this turn.

-> … There are a lot of other scenarios where we’ll need to access other classes’ method. E.g., a “Kill” method on Unit will have to check if the current player has still got at least 1 unit alive, and it will have to call a Finish method on Game otherwise.


I think the coupling can’t be avoided (correct me if I’m wrong though!). I’ve thought about two possible ways of dealing with coupling:

Solution 1

When constructing instances of these classes, I could pass the current Game’s instance. After all, it makes sense: Unit instances, Turn instances, … all belong to a game.
Then, I could implement the methods GetNextPlayableUnit, MoveTo, Killed, … easily by using this instance. Somehow, I don’t feel comfortable sharing the current game’s instance between all the model classes, even though I read here and there that it was the principle of dependency injection.

Solution 2

  1. Analyse the method dependencies: e.g., Kill method depends on Game.Units.Unit.Player (to retrieve the Player owning the Unit), on Game.Units.GetUnits (to find all other Units owned by the player), on Game.End to end the game if unit count of the player has reached 0.
  2. Find the dependencies common root: in the example above, the common root between Game.Units.Unit, Game.Units and Game is Game. In another example, if we had the dependencies Game.Units.Unit & Game.Units.SomethingElse, the common root would be Game.Units.
  3. Implement the method in this common root class. We’re guaranteed not to need to access parent classes (in the association hierarchy).


  • lots of methods will have the Game class for common root => lots of methods in Game class => lots of code in Game class.
  • methods won’t belong to their rightful classes. Consider the method “KillUnit”: you’d expect to find it in the Unit class directly, not in the Game class. Same goes for “MoveTo”, “Finish”, …

Is there any other solution you can think of? What would be the best approach in this particular case?

Trying to install rpm package in Fedora 21, but dependency on OpenJDK 7 results in errors

I am running Fedora 21 32bit workstation version.

Trying to install iris-4.22.0-1.noarch.rpm:

[itse@localhost Downloads]$ sudo yum install iris-4.22.0-1.noarch.rpm
[sudo] password for itse: 
Loaded plugins: langpacks
Examining iris-4.22.0-1.noarch.rpm: iris-4.22.0-1.noarch
Marking iris-4.22.0-1.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package iris.noarch 0:4.22.0-1 will be installed
--> Processing Dependency: java-1.7.0-openjdk for package: iris-4.22.0-1.noarch
--> Processing Dependency: postgresql-jdbc for package: iris-4.22.0-1.noarch
--> Processing Dependency: postgresql-server for package: iris-4.22.0-1.noarch
--> Running transaction check
---> Package iris.noarch 0:4.22.0-1 will be installed
--> Processing Dependency: java-1.7.0-openjdk for package: iris-4.22.0-1.noarch
---> Package postgresql-jdbc.noarch 0:9.3.1102-1.fc21 will be installed
---> Package postgresql-server.i686 0:9.3.5-5.fc21 will be installed
--> Processing Dependency: postgresql-libs(x86-32) = 9.3.5-5.fc21 for package: postgresql-server-9.3.5-5.fc21.i686
--> Processing Dependency: postgresql(x86-32) = 9.3.5-5.fc21 for package: postgresql-server-9.3.5-5.fc21.i686
--> Processing Dependency: libpq.so.5 for package: postgresql-server-9.3.5-5.fc21.i686
--> Running transaction check
---> Package iris.noarch 0:4.22.0-1 will be installed
--> Processing Dependency: java-1.7.0-openjdk for package: iris-4.22.0-1.noarch
---> Package postgresql.i686 0:9.3.5-5.fc21 will be installed
---> Package postgresql-libs.i686 0:9.3.5-5.fc21 will be installed
--> Finished Dependency Resolution
Error: Package: iris-4.22.0-1.noarch (/iris-4.22.0-1.noarch)
           Requires: java-1.7.0-openjdk
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

The error states a dependency on java-1.7.0-openjdk, but as I understand Fedora 21 uses java-1.8.0-openjdk.

How do I overcome this dependency? As I understand packages dependent on OpenJDK 7, should be able to also work on OpenJDK 8.

I tried to manually install the OpenJDK7 rpm downloaded from this link: http://rpmfind.net//linux/RPM/fedora/updates/20/i386/java-1.7.0-openjdk-

The installation failed with the following error:

[itse@localhost Downloads]$ sudo yum install java-1.7.0-openjdk-
[sudo] password for itse: 
Loaded plugins: langpacks
Examining java-1.7.0-openjdk- 1:java-1.7.0-openjdk-
Marking java-1.7.0-openjdk- to be installed
Resolving Dependencies
--> Running transaction check
---> Package java-1.7.0-openjdk.i686 1: will be installed
--> Processing Dependency: java-1.7.0-openjdk-headless = 1: for package: 1:java-1.7.0-openjdk-
--> Processing Dependency: xorg-x11-fonts-Type1 for package: 1:java-1.7.0-openjdk-
--> Running transaction check
---> Package java-1.7.0-openjdk.i686 1: will be installed
--> Processing Dependency: java-1.7.0-openjdk-headless = 1: for package: 1:java-1.7.0-openjdk-
---> Package xorg-x11-fonts-Type1.noarch 0:7.5-14.fc21 will be installed
--> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.5-14.fc21.noarch
--> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.5-14.fc21.noarch
--> Running transaction check
---> Package java-1.7.0-openjdk.i686 1: will be installed
--> Processing Dependency: java-1.7.0-openjdk-headless = 1: for package: 1:java-1.7.0-openjdk-
---> Package ttmkfdir.i686 0:3.0.9-44.fc21 will be installed
--> Finished Dependency Resolution
Error: Package: 1:java-1.7.0-openjdk- (/java-1.7.0-openjdk-
           Requires: java-1.7.0-openjdk-headless = 1:
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Can I just install OpenJDK 8 and somehow remove the dependency on OpenJDK 7 since 8 is backwards compatible with 7?

Non-sense error messages for unmet dependencies in Debian Jessie

My problem is not understanding the error messages: It says I need blah-blah-1.49 (>= 1.49-1) and this is not installable but I have blah-blah-1.55 installed already.

I think 1.55 is greater than or equal to 1.49.

Question and Answer is proudly powered by WordPress.
Theme "The Fundamentals of Graphic Design" by Arjuna
Icons by FamFamFam