They're part of the Three Poisons (en.wikipedia.org/wiki/Three_poisons) that need to be uprooted in order to attain Nibbana. They're not mutually exclusive and hence mutually reinforce each other to grow and spread. The Noble Eightfold Path is the condition for uprooting the Three Poisons.
– santa100Mar 27 '19 at 14:53

HH the Dalai Lama states (from memory) 'The path is easy for those with no preferences'. So perhaps preferences are the obstacle, thus desire, craving etc., which in turn are an outcome of ignorance.
– user14119Jun 8 '19 at 11:53

I think that the four noble truths talk about the cessation of craving; and that the doctrine of the twelve nidanas say that craving is conditioned by sensation -- that it's caused or fuelled by e.g. "delighting" in pleasant sensations, aversion to unpleasant sensations, ignorance during neutral sensations.

So instead there should be "just seeing" and so on.

Another (more complicated) answer is that it's caused by habits or habitual tendencies, different kinds of desires and ignorance and wrong views: see for example What is effluent?

--

A more literal answer, I read that the 12 nidanas can be divided into groups:

Causal process of previous life:

Ignorance

Sankharas

Process of effect in the present life:

Consciousness

Name-and-form

Six sense-bases

Contact

Feeling/sensation

Causal process in the present life

Greed

Appropriation

Becoming

Process of effect of future life:

Birth

Death

According to that model it's the link between 7 and 8 which you can affect, i.e. that where it's possible to "stop the wheel" -- because that's the part of it which happens in the present.

Ignorance is the root which conditions the mind, distorting our perception, thoughts and views.

We ignore the emptiness of the khandhas, and assign a permanent, fixed self to "our" actions, thoughts and words. The ignorant mind creates the idea of a doer, a perceiver, a knower, which is independent and in control of the khandhas. We see the world as something which can be controlled and possessed by that self.

We ignore the impermanence of conditioned phenomena, and we cling to things, feelings and events, wrongly assuming that they will last forever.

We ignore that happiness and suffering do not come from outside, but it is the mind which creates the internal conditions for those states, according to its past habits and tendencies, and to its past kamma. We ignore the fact that all conditioned phenomena are unsatisfactory at last, and that, because of their impermanence, the satisfaction they bring will eventually come to an end.

We ignore that there is a escape to suffering, and a alternative a unstable, conditioned happiness. We ignore the possibility of Nibbana.

We ignore, in sum, our ignorance, which perpetuates the wandering through life.

The mind does not know these things, and as a result, it grasps the world from a illusory perspective, not seeing things as they are.

Ignorance (not merely intellectual, but also experiential, internalized) is the spark which ignites the flame of craving and aversion.

Understanding the roots and causes of suffering, you eradicate both, the seeds of ignorance and craving.

First of all, "what prevents us" is not understanding what the Nirvana actually is, in real life. Specifically, not understanding that Nirvana is tathata, not knowing what tathata is, not knowing how tathata is violated, and therefore not understanding how tathata can be restored -- and so completely not understanding the Four Noble Truths and the Eightfold Noble Path.

When none of this is understood, it can't be practiced.

Second problem, is endless procrastination, or "feeding on wrong food types". Because we're used to getting our entertainment, our information, our distraction from depression, and our mental energy, from all kinds of dirty worldly sources - like social networks, TV series, or even talking about "dharma" (repeating the concepts without actually understanding the underlying meaning) - we habitually keep going to these sources moment after moment, instead of stopping to see reality. We keep feeding, and this keeps the cycle spinning, it creates inertia that pushes us forward.

The most accurate answer is that that which keeps us from attaining Nibbana is that which keeps us from attaining Nibbana. Having had direct experience with failing to attain Nibbana the general causal model appears as something like this to me;

ignorance leads to making bad decisions, one who is ignorant can not make good decisions.

expecting one thing the ignorant acts but his expectations are unrealistic, he is delusional.

Discontentment leads to pursuit of what is perceived as agreeable to one's best ability.

Eventually a subject can go completely "psychotic/neurotic" if he finds himself completely unable to interact with environment in a way that produces predictable outcomes agreeable to the subject.

There are causes and conditions for the decisions being made and it is a trial and error process, ultimately we don't really make mistakes because there is no opening to act outside of the behavioral conditioning nor can a maker of decisions be pinned as a truth or reality.

How this relates to the question is that it is not in vain that one is restrained by the monastic discipline and is ought to see the danger even in minor transgressions. It takes constant vigilance to hold the reins of mind as to direct the directable towards the destruction of delusion.

It is easy to fall off and one is essentially losing battles of which one is not aware because of the compromised understanding. External conditions such as a coaches and teachings are blessings, guides and advisers that can restrain one from making bad moves.

It is up to us to keep making effort and learning by trial and error.

saṃyutta nikāya 1

connected discourses with devatas

Drowsiness and Lethargy “Drowsiness, lethargy, lazy stretching, Discontent, torpor after meals: Because of this, here among beings,
The noble path does not appear.”

“Drowsiness, lethargy, lazy stretching, Discontent, torpor after
meals: When one dispels this with energy, The noble path is cleared.”

Ignorance leads to craving along with all the other stages of dependent origination which describe existence. Craving is the special link in the chain that, when diminished, can lead to a disruption of the whole process thereby freeing one from the suffering that is dependent on birth and death.

I assume you mean "cessation" when you write "uprooting." And so, the complete cessation of both craving and ignorance is a result of direct insight into the truth nature of things; ie, the truth of suffering, its origination, its cessation and the way leading to its cessation... the truth of the taints, what they're made of, that we can be free of them and the way to remain free of them.

In order to obtain Nirvana one should focus on the cessation of craving as a means of implementing the whole entire Noble Eightfold Path. Weakening craving allows for the possibility of enacting Right Action with Right effort, living Right livelihood, seeing with Right view, holding Right intention, keeping Right speech, Right mindfulness, and Right Concentration.

Nirvana is already here. It's always here. We don't experience because we are caught up in the turbulence of a worldly existence. We cannot attain what we already have. But we are prevented from experiencing it. The most direct path is to STOP. When we stop indulging the world, we become unattached to it. Then the mind and heart can settle down. It's in a quiet, secluded, calm frame of mind that we can shed our ego, and can clearly see, that only in this moment is clarity possible. The future and the past aren't a part of this. In some cases we need to simplify our lives. For this we have the precepts as guides.

Hi Eric! What is, in your opinion, the practical difference between Nibbana not being in the present, and Nibbana not being experienced in the present? Aren't both saying that extinguishment has not being acomplished yet? Kind regards!
– Brian Díaz FloresJun 6 '19 at 2:55

What prevents us from attaining Nibbana?
Is it the ignorance or the craving?

Both.

So, what should we focus on, in order to attain Nibbana?
Is it uprooting the craving or uprooting the ignorance?

Both. But when you are uprooting cravings ignorance also get uprooted.

Because of what reason the uprooting of craving happen?
and
Because of what reason the uprooting of ignorance happen?

According to Buddha, what we should follow is The Noble Eightfold Path and when we follow that, as a result craving and ignorance get uprooted as well. All these things are combined, all towards one goal, which is The Nirvana.

In this path first thing you should understand is, what's the problem of this world. What's the cause for all Dukka. When you understand that, you will automatically start following the path. That's where the meditation will help you to get going through eightfold path.

The answer is craving. From the arising of craving, comes the arising of suffering. That's the second noble truth.

What about ignorance?

We have craving because we have ignorance. In order to end craving, we must end ignorance.

The noble eightfold path focuses on uprooting ignorance. When ignorance is removed, craving will cease.

Uprooting of craving happens because of the uprooting of ignorance.

Uprooting of ignorance happens when one gains insight and wisdom into the nature of reality. Ignorance is completely uprooted when one uproots the ten fetters through wisdom and enlightenment. With that, craving will cease, and then suffering will cease.

There are many factors that prevents people from attaining Nibbana. But the biggest factor is unwholesomeness. Because unwholesome actions makes people stucked in their forms, it prevents people to meditate correctly and it makes people's minds more dense. Harming others or other beings in real life (or in this technology age it can be in internet too- we see the internet trolls whose life purpose is only harming others LOL) leads people to become narcissistic, machiavellian, psychopathic and sadistic beings that makes them almost impossible to attain Nibbana.

If the person is able to guard the mind from unwholesemness, then it is possible for him/her to meditate correctly and eventually realize Nibbana that would uproot the craving and ignorance(but let's don't forget that stream-entry is the transition stage and it has imperfections and only Arahants are completely free from the defilements)

Until a meditator attains Nibbana, the craving and ignorance continues so it is better to not try to get rid of them. Only after the attainment of Nibbana everything totally changes for a person. After the attainment of Nibbana the person is orbiting the right planet. Before that, the person is all over the map. That's why guarding the mind with help of mindfulness is necessary.

The meditator undertakes the practice of morality, specifically guarding the mind from unwholesomeness (sīlavisuddhi)

Also practising mindfulness all day long with effort is the gateway to liberation. Practising mindfulness all day long with effort naturally leads a person to guard the mind from unwholesomeness and makes it so much easier for a person to gain insight and purify the mind. In general, there is the view for the meditators that attaining stream-entry cannot be possible before 20 years, 30 years or maybe in one life time. Well, If the person is capable of practising mindfulness all day long with effort s/he can realize Nibbana in a very short period of time.(Few years or even in a shorter period of time).

There is this wrong perception of doing formal meditation for few minutes or even hours a day-and then returning to ordinary life and then totally losing the mindfulness and engage in unwholesome activies- can somewhow change a person, make him/her grow spiritually or can lead the person to enlightenment. It is not possible to have positive results in spirituality If a person is clinging to such wrong ideas.