He said the incident was not being treated as a terrorist case for the moment despite the "Islamic State" claiming responsibility for the attack.
Judiciary police are investigating the incident to understand the reasons for the attack, said Eric Morvan, general director of the national police, in a tweet.
He was shot dead by police when he ran towards them in a threatening way, the minister said.
Jean-Jacques Brot, the top government administrator in Yvelines, tweeted to confirm the assailant was killed.
A man has killed at least two people and seriously injured one other in a knife attack in the Paris suburb of Trappes.
French Interior Minister Gérard Collomb said the incident was not now being treated as a terror attack.
One other person has been seriously injured in the attack.
Experts have urged caution about recent IS announcements because it has lost credibility after claiming responsibility for seemingly unrelated violence as it faces defeat on the battlefield in the Middle East.
Three French officials identified the two people killed in the attack in Trappes and the mother and sister of the attacker. The friend, Said Segreg, said Salhi had no obvious problems, didn't abuse drugs or alcohol and wasn't fervently religious.
France has been hit by a string of high-profile terrorist attacks, including a shooting at the offices of a prominent satirical magazine and a rampage through Paris in November 2015.
Only a short drive from the wealthy area of Versailles, home to the world-famous Versailles Palace, the town is known for problems linked to poverty.
About 50 locals are suspected of having left France to fight for IS in Syria and Iraq.
The twisted terror group claimed the attack was a direct response to a call to arms by the ISIS leadership which told its followers to attack civilians in countries "at war with the extremist group".